LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 10-01-2016, 01:21 AM   #1
linux4evr5581
Member
 
Registered: Sep 2016
Location: USA
Posts: 275

Rep: Reputation: Disabled
Changing Root and Sudo pass


Might be a dumb question but is making the root password different from sudo password a good idea? I read that sudo obfuscates the root's password, so Idk if changing the root pass would interfer with that, or reduce security.. Also how would I know which setuid programs query other setuid programs in order to complete it's operation, is it hinted or referenced somewhere in the man pages? And would the targetpw flag in visudo negate the need for querying passwd? Thank you in advance!!

Last edited by linux4evr5581; 10-01-2016 at 01:24 PM.
 
Old 10-01-2016, 01:46 AM   #2
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
The sudo password is that of the user invoking the sudo command so it should not be the root password. In other words if user1 is issuing a command with sudo then user1 would use his/her password not root's. That is the purpose of sudo, so a normal user can execute a command as root without being root and no need to know the root password.
 
Old 10-01-2016, 02:11 AM   #3
linux4evr5581
Member
 
Registered: Sep 2016
Location: USA
Posts: 275

Original Poster
Rep: Reputation: Disabled
Thanks for the reply but why then on Ubuntu does the first user that's created with the installation use the default password (pass you setup during installation) for both sudo and root.. Of course I know that other users should not use the root password for their sudo, but for the admin is it ok? I guess it should be since it does this by default, but would changing either the sudo or root pass so that their not the same make it more secure?

Last edited by linux4evr5581; 10-01-2016 at 02:25 AM.
 
Old 10-01-2016, 02:31 AM   #4
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 363Reputation: 363Reputation: 363Reputation: 363
There's no such thing as a 'sudo password' (as far as I-newbie-too know)!
It is *the user's*, different for each user. (like a website verifying YOUR pwd [to edit profile])
From this (#7) it looks like Ubuntu doesn't ask for a root password!
Strange...other 'distro's do. Can someone explain (what's Ubuntu's *root* password?)
Oh: it's "locked", so *su* (not meaning sudo) &login as root won't work.
Apparently, it's possible to: sudo passwd root (to give root a password you choose)

Last edited by Jjanel; 10-01-2016 at 02:46 AM.
 
1 members found this post helpful.
Old 10-01-2016, 03:01 AM   #5
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,292
Blog Entries: 3

Rep: Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718
The general idea behind using "sudo" is that of least privilege. Accounts should have just enough access to get their jobs done, no more, no less. The way many distros apply "sudo" doesn't make that obvious because they just open the system wide open by default instead of providing a demo of the granularity available in "sudo"

I have no influence on the direction Ubuntu and Linux Mint take but if I were setting the defaults for /etc/sudoers, I would propose something like this for the initial default:

Code:
%sudo ALL=(root:root) /usr/sbin/visudo ""
However, to have mercy on beginners, it would also have to include something like the following or the graphical equivalent:

Code:
%sudo ALL=(root:root) /usr/bin/apt-get
Those two lines would make users in the group "sudo" able to install or remove packages as well as customize "sudo".

There's more, but "sudo" is surprisingly advanced. Michael W Lucas covers it in his presentation sudo : you're doing it wrong and in his fairly concise book, sudo Mastery. Those two resources can be skimmed quickly to find the parts interesting for you, then you can dig deeper in the manual page for sudoers

Code:
man sudoers
 
Old 10-01-2016, 03:11 AM   #6
linux4evr5581
Member
 
Registered: Sep 2016
Location: USA
Posts: 275

Original Poster
Rep: Reputation: Disabled
OK ok mybad I remember sudo is just a group and by default the first user would be in that group (but why if their already in the admin group?) and then you enter your own user password.. And I meant Mint I apologize, but you can login to Ubuntu as root with sudo -i..
 
Old 10-01-2016, 03:19 AM   #7
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,292
Blog Entries: 3

Rep: Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718
Quote:
Originally Posted by linux4evr5581 View Post
you can login to Ubuntu as root with sudo -i..
Yes, that's an example of it being a bit too loose and not showing what it can do.

For that reason, it is a good idea for Ubuntu users to always make a second account and use that second account for daily activities, leaving the first account only for when administration is necessary. Same for Linux Mint and others that have the same defaults.
 
Old 10-01-2016, 03:19 AM   #8
linux4evr5581
Member
 
Registered: Sep 2016
Location: USA
Posts: 275

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Turbocapitalist View Post
The general idea behind using "sudo" is that of least privilege. Accounts should have just enough access to get their jobs done, no more, no less. The way many distros apply "sudo" doesn't make that obvious because they just open the system wide open by default instead of providing a demo of the granularity available in "sudo"

I have no influence on the direction Ubuntu and Linux Mint take but if I were setting the defaults for /etc/sudoers, I would propose something like this for the initial default:

Code:
%sudo ALL=(root:root) /usr/sbin/visudo ""
However, to have mercy on beginners, it would also have to include something like the following or the graphical equivalent:

Code:
%sudo ALL=(root:root) /usr/bin/apt-get
Those two lines would make users in the group "sudo" able to install or remove packages as well as customize "sudo".

There's more, but "sudo" is surprisingly advanced. Michael W Lucas covers it in his presentation sudo : you're doing it wrong and in his fairly concise book, sudo Mastery. Those two resources can be skimmed quickly to find the parts interesting for you, then you can dig deeper in the manual page for sudoers

Code:
man sudoers
Thanks for the tips I might use that policy!

Last edited by linux4evr5581; 10-01-2016 at 01:28 PM.
 
Old 10-01-2016, 03:24 AM   #9
linux4evr5581
Member
 
Registered: Sep 2016
Location: USA
Posts: 275

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Turbocapitalist View Post
Yes, that's an example of it being a bit too loose and not showing what it can do.

For that reason, it is a good idea for Ubuntu users to always make a second account and use that second account for daily activities, leaving the first account only for when administration is necessary. Same for Linux Mint and others that have the same defaults.
Good to know I was just missing/forgot a few fine points about sudo that you,lazydog, and jjanel mentioned (haven't messed with it in awhile) anyways thanks again

Last edited by linux4evr5581; 10-01-2016 at 02:15 PM.
 
Old 10-01-2016, 04:58 AM   #10
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Sudo: you're doing it wrong.
https://help.ubuntu.com/community/RootSudo
https://wiki.debian.org/sudo
https://wiki.archlinux.org/index.php/Sudo

Every distro ships with sudo?

Last edited by Habitual; 10-01-2016 at 05:01 AM.
 
Old 10-01-2016, 01:36 PM   #11
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by linux4evr5581 View Post
Thanks for the reply but why then on Ubuntu does the first user that's created with the installation use the default password (pass you setup during installation) for both sudo and root.. Of course I know that other users should not use the root password for their sudo, but for the admin is it ok? I guess it should be since it does this by default, but would changing either the sudo or root pass so that their not the same make it more secure?
you do not get a root in ubuntututututu they think they know best for everyone .. so they deveate LINUX/GNU ~ UNIX Norms ...
 
Old 10-01-2016, 02:16 PM   #12
linux4evr5581
Member
 
Registered: Sep 2016
Location: USA
Posts: 275

Original Poster
Rep: Reputation: Disabled
I think with Debian you have to install it, unless they changed it..
 
Old 10-01-2016, 02:17 PM   #13
linux4evr5581
Member
 
Registered: Sep 2016
Location: USA
Posts: 275

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by BW-userx View Post
you do not get a root in ubuntututututu they think they know best for everyone .. so they deveate LINUX/GNU ~ UNIX Norms ...
I'm assuming that's why theres quite a few variations of it..
 
Old 10-01-2016, 03:01 PM   #14
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by linux4evr5581 View Post
I'm assuming that's why theres quite a few variations of it..
personaly I think they are trying to mimic Windows a close as possiable without being called a sell out to windows to get more people leaving Windows to use there version then the other ones that are actually more not windows. it is an evil conspiracy plot I TELL YA!!! from what I've lightly read windows is now trying to widdle its way into the linux world. be carefull they put netscape out of busness by thier pratices of trying to make the windows os a completely internet aware OS, you could actually use the fielmanager to get to in internet instead of their crapy web browser that always crashes and still does, that what I did, anyways, that made too many secritiy leaks so they had to pull back a little, but it was their long enough to put netscape out of bussness.

Last edited by BW-userx; 10-01-2016 at 03:10 PM.
 
Old 10-01-2016, 03:18 PM   #15
linux4evr5581
Member
 
Registered: Sep 2016
Location: USA
Posts: 275

Original Poster
Rep: Reputation: Disabled
Interesting stuff indeed, but I think it would just make people more Linux/GNU aware, and would inspire trying out different distros as a result. But idk everyone seems so content with Mac and Windows regardless..
 
  


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] Changing from sudo accounts to a root account with password sniff SUSE / openSUSE 2 11-28-2014 11:27 AM
sudo: effective uid is not 0, is sudo installed setuid root? awladnas Linux - Newbie 10 08-30-2014 06:03 PM
Question about the sudo command, specifically how to have sudo act as if user is root slacker_ Linux - Newbie 17 09-22-2013 03:48 PM
Can't use sudo, only account that's not root is not a sudo'ers [Ubuntu 9.10] randyriver10 Linux - Desktop 1 01-09-2010 07:56 PM
Planning to change root pass and oracle system pass sathyguy Red Hat 1 12-20-2005 09:53 PM

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

All times are GMT -5. The time now is 10:02 PM.

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