Root and user accounts

Questions about the project and the distribution - obviously no support questions here please

Root and user accounts

Postby PiMinto on Mon Jan 16, 2012 4:44 am

I'm still a relative newbie, who finally got round to installing LM12 this weekend - coming from a few months of Fedora 16. WOW, SO impressed with Mint, absolutely loving it!

However I'm a little confused about the default accounts setup. In the installation process I was only asked for a username, and password. In the F16 installation, it specifically asks for a root password, and then user. How do I login as root in Mint?
PiMinto
Level 3
Level 3
 
Posts: 114
Joined: Thu Dec 01, 2011 5:50 am

Linux Mint is funded by ads and donations.
 

Re: Root and user accounts

Postby Pilosopong Tasyo on Mon Jan 16, 2012 5:09 am

PiMinto wrote:How do I login as root in Mint?

There should be an option to login as "other" in the login screen?
Username = root
Password = the one you used for your main account

That said, the usual method used in performing privileged functions in Ubuntu-based distros is to use sudo in a terminal window. Or, in the case of GUI apps (Mint Update, Synaptic, etc), it will automatically prompt you for your password.
Image
o Give a man a fish and he will eat for a day. Teach him how to fish and he will eat for a lifetime!
o If an issue has been fixed, please edit your first post and add the word [SOLVED].
User avatar
Pilosopong Tasyo
Level 6
Level 6
 
Posts: 1176
Joined: Mon Jun 22, 2009 3:26 am
Location: Philippines

Re: Root and user accounts

Postby xenopeek on Mon Jan 16, 2012 5:44 am

You don't need to login as root. Any commands you want to run as root, you prefix with sudo (or gksudo for graphical applications). sudo then asks for your password and grants the application you run temporary root privileges. So, for example:
Code: Select all
sudo apt-get install virtualbox
gksudo gedit /etc/default/grub

First one install virtualbox, second one edits the given file with gedit.

Within a terminal session, sudo remembers for a short time (15 minutes by default, IIRC) your credentials and you do not need to enter your password again on subsequent sudo commands.

To become root in the terminal, run:
Code: Select all
sudo -i
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14983
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Root and user accounts

Postby PiMinto on Mon Jan 16, 2012 8:44 am

Oh ok, I had tried
Code: Select all
su -
without success and got worried that I'd somehow locked myself out of root. Ok so no root for Mint, I can live with that :)
Thanks for replies.
PiMinto
Level 3
Level 3
 
Posts: 114
Joined: Thu Dec 01, 2011 5:50 am

Re: Root and user accounts

Postby xenopeek on Mon Jan 16, 2012 9:15 am

PiMinto wrote:Oh ok, I had tried
Code: Select all
su -
without success and got worried that I'd somehow locked myself out of root. Ok so no root for Mint, I can live with that :)
Thanks for replies.

You can do su -, but then as:
Code: Select all
sudo su -

That is exactly what sudo -i does :wink:
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14983
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Root and user accounts

Postby Pythzor on Mon Jan 23, 2012 4:36 am

I recall from having used PCLinuxOS for a while a couple of years ago that during installation, the installer sets up a root acount and a user account. Same password for both acccounts (but you could have a different root password if you wanted). Then for normal usage, you'd always log into your user account. You could even forget about the root account, since su covers root activities.

Being much more of a noob then than I am now, that came in very handy. No matter how much I trashed my computer, the root account remained a prestine-fresh install. I could go to the root account, set up another user account and start over again without having to do a fresh install.

It reminds me (now) about something I read in anouther forum (maybe PCLinuxOS) about how (with motherboard alterations) you can connect more than one monitor-mouse-keyboard set to a single computer and have different folks using all of them simultaneously without any user affecting any other user. I don't know about proprietary OSes, but Linux will support that, so I've heard. One could trash his/her part of the computer without bothering the other users (short of turning the computer into a kamakazi mission).

For some reason (I don't know what), Ubuntu is developed with the root account disabled.
AMD Athlon II X2 220 Processor × 2 , 2.8 GHz, 6 GB, Nvidia PNY 210, 1 TB hdd: Windows 7; Ubuntu 13.10; Linux Mint 16 Petra. /// Gateway E4000, Intel Pentium 4, 1.8 Ghz; 1.0 GB RAM, Geforce 5500; 32 bit; Windows 7, PCLinuxOS 201404 Mate Desktop.
Pythzor
Level 3
Level 3
 
Posts: 158
Joined: Fri Jul 09, 2010 7:05 pm

Re: Root and user accounts

Postby AlbertP on Mon Jan 23, 2012 6:51 am

Here's a page about the pros and cons of Ubuntu's setup: https://help.ubuntu.com/community/RootSudo

You can run sudo passwd root to create a root password; you'll then be able to select "Other..." and type "root" as username on the login screen. But I'd read the page first to know the consequences of running this. Anyway, you can always use sudo passwd -dl root to revert it.
Registered Linux User #528502
Image
Feel free to correct me if I'm trying to write in Spanish, French or German.
AlbertP
Level 16
Level 16
 
Posts: 6519
Joined: Sun Jan 30, 2011 12:38 pm
Location: The Netherlands

Re: Root and user accounts

Postby Pythzor on Mon Jan 23, 2012 9:54 am

AlbertP wrote:Here's a page about the pros and cons of Ubuntu's setup: https://help.ubuntu.com/community/RootSudo


Thank you for sharing that page with me. Maybe, little-by-little, I might be starting to learn something. The tone and authority with which the writer(s) pontificated, was, for noobie-me, like sitting at the feet of Gamalial:

" . . . On a more esoteric level, sudo provides some features which encourage different work habits, which can positively impact the security of the system. sudo is commonly used to execute only a single command, while su is generally used to open a shell and execute multiple commands. The sudo approach reduces the likelihood of a root shell being left open indefinitely, and encourages the user to minimize their use of root privileges . . .."

Often, at my computer, I marvel over what must have been the impact of then-Bishop Desmond TuTu's Ubuntu theology as the basis of his anti-apartheid work and 1984 Nobel Peace Prize on a then-11-year old, privileged Afrikaner boy (Mark Shuttleworth)?

Cheers

P.S. I'll leave my Mint and Ubuntu as is.
AMD Athlon II X2 220 Processor × 2 , 2.8 GHz, 6 GB, Nvidia PNY 210, 1 TB hdd: Windows 7; Ubuntu 13.10; Linux Mint 16 Petra. /// Gateway E4000, Intel Pentium 4, 1.8 Ghz; 1.0 GB RAM, Geforce 5500; 32 bit; Windows 7, PCLinuxOS 201404 Mate Desktop.
Pythzor
Level 3
Level 3
 
Posts: 158
Joined: Fri Jul 09, 2010 7:05 pm

Linux Mint is funded by ads and donations.
 

Return to Non-technical Questions

Who is online

Users browsing this forum: No registered users and 2 guests