LinuxQuestions.org
Visit Jeremy's Blog.
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 02-01-2018, 04:01 AM   #1
byebyemrgates
Member
 
Registered: Nov 2017
Location: Blue Mountains, Australia!
Distribution: Mint 19
Posts: 148

Rep: Reputation: Disabled
Can someone explain how passwords work in Linux...


Hi there, everyone again!
Does someone have a minute or two to provide a quick explanation on how passwords work in Linux?

Here is just an example of kind of things it would be nice to know:
When I install a Linux OS, it asks to set up a password - is this the "root' password?
Can that password be changed - how?
If I set up a user with administrative privileges - does his password has same "power" as the root's?
When software manager, say, asks for a password - is that"root" password? What if user with admin privileges enters his password - will that work?



Cheers!
 
Old 02-01-2018, 06:17 AM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 8,573

Rep: Reputation: 1760Reputation: 1760Reputation: 1760Reputation: 1760Reputation: 1760Reputation: 1760Reputation: 1760Reputation: 1760Reputation: 1760Reputation: 1760Reputation: 1760
You're mixing up the use of root with the use of sudo. Although the use of sudo has been available historically in Linux, most systems didn't use it as a matter of course by default. So on many Linux systems, when you install them you create a root password and then later you create a normal user with password. This changed, I believe with Ubuntu and it's many derivatives which use sudo by default. With the Ubuntu's, you must create at least one user in order to complete an installation of the system. That user will have root privileges if and only if prefixing a command in a terminal with sudo, or using sudo in a GUI which is also possible.

So in order to give you specific information about your specific system, we would need to know which Linux distribution you are using. If you are using one of the Ubuntu's such as Mint, it might help to read the Ubuntu documentation at the link below explaining it's use, advantages and disadvantages. So if you have Mint, if you want to change the user password for the user with root/sudo privileges, that would generally be the primary user created during the install.

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

Last edited by yancek; 02-01-2018 at 06:24 AM.
 
1 members found this post helpful.
Old 02-01-2018, 06:28 AM   #3
Turbocapitalist
Senior Member
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 4,107
Blog Entries: 3

Rep: Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979
One of the weak points of Ubuntu and its derivatives is their default configuration of sudo which is all-or-nothing for any "administrative" accounts. In those cases an "adminstrative" account is one with membership in the group "sudo". In other words you can give complete administrative control to a new account just by adding it to the group "sudo". Likewise you can completely revoke administrative control from an account by removing it from the group "sudo". However, you can farm out access to specific programs individually or even specific programs in combination with specific options.

sudo is really useful, and there are many guides, but there are few good guides about it. If you are interested in what it can do see Michael W Lucas' presentation on it, or buy a copy of his book sudo Mastery.

Last edited by Turbocapitalist; 02-01-2018 at 06:29 AM.
 
1 members found this post helpful.
Old 02-01-2018, 06:55 AM   #4
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,191

Rep: Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039
In addition to what has been answered in previous posts:

Usually there is a root user which holds all permissions. There is not a single restriction on the power of the root user. Unlike the limited power of the Administrator in Windows. Root holds absolute power.

Installing a normal Linux system, not Ubuntu or derived, requires a root password and a normal user with normal user rights. If the user wants to do some thing requiring root permissions, he has to become root. Quite clean, transparent and simple.

Now when Ubuntu was created this was messed up and fuzzified. When installing Ubuntu your name is asked, and not a root password. Instead the user (you) is granted root permissions by preceding any commands with the sudo keyword. Ubuntu is created like root does not exist, and actually the root password is unknown to you.

Ubuntu tried to mimick Windows by making things "easy". Now things did not become easy, but they did become more Windows-like. Less transparent, messier en more complicated.

Now it is possible to workaround the Ubuntu system and create a root password and log in as root. But that is in a certain way breaking the design philosophy of Ubuntu. Because other system components depend on the assumption that the user (you) holds root permissions, working as root has unexpected and undesired side effects.

As a result of development the past years, other distros kept the root and the ordinary user, but they also encouraged the use of sudo instead of logging in as root. Sudo as such is not bad. And by keeping the restricted user and the unrestricted root at the same time, the system remained transparent, clean and simple.

So if you prefer to use the "simple" and "user-friendly" Ubuntu systems and derivatives, you will not know the root password and perform administrative tasks using sudo.

jlinkels

Last edited by jlinkels; 02-01-2018 at 10:13 AM.
 
2 members found this post helpful.
Old 02-01-2018, 08:03 AM   #5
byebyemrgates
Member
 
Registered: Nov 2017
Location: Blue Mountains, Australia!
Distribution: Mint 19
Posts: 148

Original Poster
Rep: Reputation: Disabled
fantastic reply, jinkels, thank you! gonna paste this into my own "linux manual" Cheers!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] Can someone explain why this doesn't work? manwichmakesameal Programming 2 05-20-2012 01:33 PM
kde and gnome passwords do not work. Am shut out of linux pebmich Linux - Newbie 14 07-08-2010 02:59 PM
What libs do i need for gmplayer to work please explain lil213 Linux - Software 1 11-19-2003 05:11 AM
Is there a way to sync Samba passwords with linux user passwords MarleyGPN Linux - Networking 2 09-09-2003 10:59 AM

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

All times are GMT -5. The time now is 01:27 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration