confused about root access

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
gubmint
Level 2
Level 2
Posts: 54
Joined: Thu Oct 18, 2012 2:35 pm

confused about root access

Post by gubmint » Wed Jul 31, 2013 3:47 pm

As the subject says, I'm struggling to wrap my head around root access in Mint 15. As a recent example, I successfully followed these instructions to install Apache/MySQL/PHP/phpMyAdmin:

[url]http://linuxmint.tumblr.com/post/29678560167/installing-lamp-linux-apache-mysql-and-php-on[/url]

The next step is to copy in my previous MySQL databases from a Windows installation. However, I can't open the /var/lib/mysql folder.

Owner: mysql - MySQL Server
Group: mysql

I have added myself to the 'mysql' group, but after logging out and back in, I still can't open the folder.

Originally, I had Mint set up to not require my password to log in. I read stuff that made me think I'm not truly logged in as root without it, so I changed that aspect but still nothing. For that matter, I don't see any option to specify logging in as root as opposed to just myself. Do they have to be set up as separate accounts? (I'm also in the 'root' and 'sudo' groups.) Example (first reply):

http://forums.linuxmint.com/viewtopic.php?f=90&t=137375

Ideally, I would be able to open/edit/create/etc. files as needed without logging out and in all the time, but I understand that's a security risk and what makes Linux so much more stable than Windows. I could just use a Root for Dummies course to understand how to move about as needed!

TBABill
Level 6
Level 6
Posts: 1361
Joined: Wed Dec 30, 2009 1:02 pm
Location: Leonardtown, MD

Re: confused about root access

Post by TBABill » Wed Jul 31, 2013 4:13 pm

https://help.ubuntu.com/community/RootSudo

Easy explanation of root and why in some distros you can become SU (superuser) and Ubuntu/Mint you cannot. However, you can obtain root privileges in Ubuntu/Mint to perform functions so in essence you can have the same powers, but cannot just operate the distro as superuser.

gubmint
Level 2
Level 2
Posts: 54
Joined: Thu Oct 18, 2012 2:35 pm

Re: confused about root access

Post by gubmint » Wed Jul 31, 2013 4:29 pm

Thanks, that mostly makes sense. So, are you saying it's reasonable to use "sudo -i" and "sudo passwd root" as a temporary means of copying files to a protected directory, then "sudo passwd -dl root" to return to normal, non-root? The article seems to be cautioning against that, so maybe you mean just using sudo/gksudo as needed?

Coming from a Windows background, I have a really hard time carrying out actions via the command line, so it's not at all intuitive how to copy a folder without using the file manager.

TBABill
Level 6
Level 6
Posts: 1361
Joined: Wed Dec 30, 2009 1:02 pm
Location: Leonardtown, MD

Re: confused about root access

Post by TBABill » Wed Jul 31, 2013 4:53 pm

No, I wouldn't endorse it. I was more just using it to explain it better. Why not just open up the file manager with root permissions so you can do as you wish graphically?

Code: Select all

gksudo nemo
I think that'll work to get you to superuser permissions within a graphical environment and be able to manipulate folders and files without permission issues. That's much safer, but beware anything outside of /home is a system folder so you can do some serious harm if not careful. Make sure you intend to take the actions you take in order to keep your system running properly.

gubmint
Level 2
Level 2
Posts: 54
Joined: Thu Oct 18, 2012 2:35 pm

Re: confused about root access

Post by gubmint » Wed Jul 31, 2013 5:00 pm

TBABill wrote:No, I wouldn't endorse it. I was more just using it to explain it better. Why not just open up the file manager with root permissions so you can do as you wish graphically?

Code: Select all

gksudo nemo
I think that'll work to get you to superuser permissions within a graphical environment and be able to manipulate folders and files without permission issues. That's much safer, but beware anything outside of /home is a system folder so you can do some serious harm if not careful. Make sure you intend to take the actions you take in order to keep your system running properly.
Ooh, I didn't know you could do that! I'm using Caja (Mint 15 default), but same idea. That's a massive help!! I just copied one database table over successfully. Looks like this should be a smooth process now.

Thanks for the warning, duly noted. :D I'm reasonably familiar with Unix systems from a web hosting environment, so I know the safe and not so safe areas to play in. It's just a bit intimidating getting used to it all for setting up a PC.

TBABill
Level 6
Level 6
Posts: 1361
Joined: Wed Dec 30, 2009 1:02 pm
Location: Leonardtown, MD

Re: confused about root access

Post by TBABill » Thu Aug 01, 2013 2:13 pm

Not a problem and glad you have it sorted. It's much more pleasant and feels more natural when you can do things graphically so it's cool that this one worked out for you.

Post Reply

Return to “Newbie Questions”