Root and user accounts

Questions about the project and the distribution - obviously no support questions here please
Forum rules
Do not post support questions here. Before you post read the forum rules. Topics in this forum are automatically closed 6 months after creation.
Locked
PiMinto

Root and user accounts

Post by PiMinto »

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?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
Pilosopong Tasyo
Level 6
Level 6
Posts: 1432
Joined: Mon Jun 22, 2009 3:26 am
Location: Philippines

Re: Root and user accounts

Post by Pilosopong Tasyo »

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.
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
xenopeek
Level 25
Level 25
Posts: 29588
Joined: Wed Jul 06, 2011 3:58 am

Re: Root and user accounts

Post by xenopeek »

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
Image
PiMinto

Re: Root and user accounts

Post by PiMinto »

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.
User avatar
xenopeek
Level 25
Level 25
Posts: 29588
Joined: Wed Jul 06, 2011 3:58 am

Re: Root and user accounts

Post by xenopeek »

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:
Image
Pythzor
Level 3
Level 3
Posts: 161
Joined: Fri Jul 09, 2010 7:05 pm

Re: Root and user accounts

Post by Pythzor »

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.
Intel Core2 Duo, 3.0 GHz, 6 GB ram, 160 GB hdd; Ultimate Edition Oz Unity Star Sapphire (discontinued Ubuntu 14.04 remix that I've been able to upgrade to a 16.04 base); Linux Mint 18.2/Mate.
AlbertP
Level 16
Level 16
Posts: 6701
Joined: Sun Jan 30, 2011 12:38 pm
Location: Utrecht, The Netherlands

Re: Root and user accounts

Post by AlbertP »

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.
Pythzor
Level 3
Level 3
Posts: 161
Joined: Fri Jul 09, 2010 7:05 pm

Re: Root and user accounts

Post by Pythzor »

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.
Intel Core2 Duo, 3.0 GHz, 6 GB ram, 160 GB hdd; Ultimate Edition Oz Unity Star Sapphire (discontinued Ubuntu 14.04 remix that I've been able to upgrade to a 16.04 base); Linux Mint 18.2/Mate.
Locked

Return to “Non-technical Questions”