LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-15-2018, 02:27 AM   #1
machika
LQ Newbie
 
Registered: Jan 2018
Posts: 11

Rep: Reputation: Disabled
Do you need Root & User Password?


Ubuntu install lets you create a single do-everything password. Is it better practice to revert to the standard of a $ and # password? On a single user/owner home PC, is there a good reason to do so? Or, not to do so?
 
Old 01-15-2018, 02:50 AM   #2
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
Quote:
Originally Posted by machika View Post
Ubuntu install lets you create a single do-everything password. Is it better practice to revert to the standard of a $ and # password? On a single user/owner home PC, is there a good reason to do so? Or, not to do so?
Ubuntu uses sudo to manage administrator privileges.

You can enable the root user account if you wish, but sudo is different in that it only grants administrator privileges for a short period of time.

The root user account has all privileges and should ONLY be used when you need administrator privileges. If your new to Linux I'd suggest you learn the system before using the root user account.
 
Old 01-15-2018, 05:31 AM   #3
mwx
Member
 
Registered: Jan 2009
Location: Virginia, USA
Distribution: CentOS - Ubuntu
Posts: 69

Rep: Reputation: 0
Best practices would say that a different passwd for each user is prudent - just as a general practice. If your Linux experience is never going to leave the doors of your house and your machine isn't going to be public facing (ports open and forwarded to behind a NAT) then I don't see there being any issue with the same passwd for each user and a relatively simple one at that.

My home-built NAS units which reside on the local network - but are not publicly accessible - have simple pass configurations. Anything that is public facing is generally more complex than that. The SUDO system/method is really good in practice - because as you get deeper into Linux there are going to be times where you will be very happy you weren't root after hitting the enter key... Just develop the habit of using it... It really is unnecessary to be travelling around as root all of the time for every day tasks and can in turn create much greater unanticipated problems down the line.
 
Old 01-15-2018, 08:56 AM   #4
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
I very strongly advise that you should not "routinely" use a user account that is capable of issuing the command sudo su to become root. In other words, your ordinary accounts should not be a member of the wheel group.

Then, yes, I would disable direct login access to the root user-id. (Usually, this is already done.)

This is an exercise of the Principle of Least Privilege, which takes advantage of the fact that "digital computers are terrible at knowing when to say 'yes,' but they're terrific at saying 'no!'"

Only one user-id on your system should be capable of walking into a telephone booth and flying out wearing ugly blue tights. Any rogue software that manages to steal your password (or to cajole you into providing it) would find its feet stuck firmly on the ground. And of course, you should never provide that user-name and password in response to any prompt, unless you are damn sure where it came from.

On all of my systems, of whatever type, every user save one is a "limited user," incapable of exercising elevated privileges, and all of their /home directories are private to themselves. (And if you did somehow get a list of users, you couldn't pick out which one it was.)
 
1 members found this post helpful.
Old 01-15-2018, 09:10 AM   #5
mwx
Member
 
Registered: Jan 2009
Location: Virginia, USA
Distribution: CentOS - Ubuntu
Posts: 69

Rep: Reputation: 0
Mucho good advice sundialsvcs!
 
Old 01-15-2018, 11:40 AM   #6
machika
LQ Newbie
 
Registered: Jan 2018
Posts: 11

Original Poster
Rep: Reputation: Disabled
@sundialsvcs
Your response is at the threshold of my Linux knowledge - probably beyond.. anyway,

Quote:
I very strongly advise that you should not "routinely" use a user account that is capable of issuing the command sudo su to become root.
This is exactly what my install did. I can just, $ sudo su, and become #. That's poor, right?

So, to improve that, I'd have to create a root account (be patient I'm winging it..)
then if I wanted to be root, I'd Ctrl + Alt + F1, go into console, sign in and be root there. Something along those lines, I assume.
 
Old 01-15-2018, 11:48 AM   #7
Mill J
Senior Member
 
Registered: Feb 2017
Location: @127.0.0.1
Distribution: Mint, Void, MX, Haiku, PMOS, Plasma Mobile, and many others
Posts: 1,258
Blog Entries: 2

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
Thats the default config for Ubuntu, I mean you'll still need the administration password to run sudo.

On the default Ubuntu you can't login as root, unless you run sudo passwd root and set a password first. after that just run su in any term and provide the root password.
 
Old 01-15-2018, 12:11 PM   #8
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
This is a tough one. While I agree with sundialsvcs in princial I feel that the Ubuntu sudo setup is, perhaps, "good enough" for a single-user home system and thatKs why they did it.
Personally, I log in as root when I want root using "su -" with no sudo, because when I log in as root I'm only carrying out system-administrator tasks.
I also find an awful lot of blog posts and even scripts out there which seem to preface every command with "sudo" for no opther reason than the person posting it doesn't know whether they need to sudo (or can't specify a full path as with he case of ifconfig) and range from just silly to potentially dangerous.
 
1 members found this post helpful.
Old 01-15-2018, 12:20 PM   #9
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
Quote:
Originally Posted by machika View Post
@sundialsvcs
Your response is at the threshold of my Linux knowledge - probably beyond.. anyway,

This is exactly what my install did. I can just, $ sudo su, and become #. That's poor, right?

So, to improve that, I'd have to create a root account (be patient I'm winging it..)
then if I wanted to be root, I'd Ctrl + Alt + F1, go into console, sign in and be root there. Something along those lines, I assume.
When you put in your password for sudo, sudo gives that user account root user rights, to the command, you are running with sudo in front of it.
 
Old 01-15-2018, 02:47 PM   #10
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
You can also become root user from a virtual terminal, like gnome-termianl, not just CTRL+ALT+F1
 
Old 01-15-2018, 05:01 PM   #11
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
I will "politely dissent" here and simply suggest that you should not continue to use the first user-ID which (Ubuntu) sets up: instead, set up another one for everyday use.

And, if you "wear many hats," set up as many as you need – one for each "hat." Every single one of them non-privileged.

For instance, when I have to do small-business accounting (ick ...), I log-in as the accountant-user. All of the files needed by the accounting application are located in this user's home directory – and are accessible to no one else. (On my machine, all /home directories have permissions 0x700.)

Since these accounts have no credible reason to be authorized to fly out of a phone-booth, they can't.

Last edited by sundialsvcs; 01-15-2018 at 05:04 PM.
 
Old 01-15-2018, 06:00 PM   #12
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
Quote:
Originally Posted by sundialsvcs View Post
I will "politely dissent" here and simply suggest that you should not continue to use the first user-ID which (Ubuntu) sets up: instead, set up another one for everyday use...
I'm not sure who your "dissenting" with here sundialsvcs, but to expand upon the point I was trying make in post #2:

On my machine, the only user account that has ANY root privileges is the root user account. I agree with setting up an UN-privileged account for everyday use. I also totally agree with 273. I also follow the "Principle of least privilege" and always do myself.

My point was that, the OP should do as much learning about Linux and best security practices BEFORE worrying about enabling the root user account. I also agree that it would be very wise to setup an account that does not have any permissions from sudo, aka a completely un-privileged user account.

But, you need to remember that your talking to someone that does not seem to have a lot of experience with Linux, un-like yourself. Which is why the OP should be focusing on learning best security practices and about how that can be applied to Linux.

I personally would also say that one un-privileged user account would be more than enough for a stand-alone/home system, that is not a part of any local network and has only an Internet based network connection.
 
Old 01-15-2018, 09:58 PM   #13
machika
LQ Newbie
 
Registered: Jan 2018
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
- one un-privileged user account would be more than enough for a stand-alone/home system,
Phew.

OTOH..

Quote:
suggest that you should not continue to use the first user-ID which (Ubuntu) sets up: instead, set up another one for everyday use.
Thanx all. My appointment book is full for the next few days: Learn Linux Password Security Practice/Policy.
 
Old 01-15-2018, 10:16 PM   #14
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
I prefer having separate root and user(s) passwords.

I have never yet seen a convincing security argument for the *buntus' creepy sudo fetish. When I use a *buntu, one of the first things I do is establish a root password.

Not that I have strong feelings about this . . . .
 
Old 01-17-2018, 12:31 AM   #15
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
If you want to be proficient with Linux, you need to break it often, and fix it. Single user/owner home pc.... I suggest playing with all features since you are not on a network, split the drive into multiple small partitions or use more than one drive and install more than one copy, do your online banking and sensitive stuff on one secure installation and play on the disposable copies, assuming precious data is stored on a separate "DATA" drive/partition. Storing data in the OS partition is just down right stupid, weak, and will prevent rapid advancement.

If you've been using Mac or Windows and are already accustomed to doing sensitive online activities there, chances are you'll keep doing it there since your already comfortable with that. BREAK YOUR LINUX

I always have root account, sudo requires too much typing, I hate it, don't use it, stopped installing it. All CLI is done as root and have never cried a single tear.
The day Debian denies root access is the day I give Linux the finger and the boot, goodbye Linux.

Last edited by Brains; 01-17-2018 at 12:39 AM. Reason: Added my "root" thoughts
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GNOME: Gain privileges using current user's password instead of root's password maxkukartsev Fedora 5 02-10-2012 09:46 AM
Forgot Root Password & User Name !! bhavyanandan Linux - Newbie 7 09-29-2009 07:35 PM
unique problem in resetting root password in suse linux in single user mode & rescue amit_kalipur Linux - Security 1 07-14-2009 01:41 PM
How could normal user obtain root password or change root password ckamheng Debian 18 02-18-2009 10:28 PM
Cannot change root password (let alone standard user's password) jbottiger Red Hat 4 01-06-2009 08:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration