You are not logged in.

#1 2013-04-19 17:27:47

Grant
Member
From: Italy
Registered: 2012-12-15
Posts: 216

[SOLVED] sudo's password not changed

Hello everyone.

I wanted to change the root's password. And so I logged with root's account in a separate tty and I did, using passwd.
I thought changing root's password would changed the sudo's password too. But it didn't work.
What's wrong?

Thanks.

Have a nice day, Grant.

Last edited by Grant (2013-04-21 12:06:51)


I am not a native speaker. If you see a mistake, please report it to me via private message. Thank you.

Offline

#2 2013-04-19 17:28:51

cecar
Member
Registered: 2013-03-10
Posts: 39

Re: [SOLVED] sudo's password not changed

There is nothing wrong. Sudo password is the users password.

Offline

#3 2013-04-19 17:33:34

Grant
Member
From: Italy
Registered: 2012-12-15
Posts: 216

Re: [SOLVED] sudo's password not changed

Are you sure?
In that case, how can sudo get more permissions?
Infact sudo should get root's permissions (or maybe I'm wrong).

Last edited by Grant (2013-04-19 17:35:25)


I am not a native speaker. If you see a mistake, please report it to me via private message. Thank you.

Offline

#4 2013-04-19 17:38:02

cecar
Member
Registered: 2013-03-10
Posts: 39

Re: [SOLVED] sudo's password not changed

More permissions than root? Root has full permissions and so can sudo.

https://wiki.archlinux.org/index.php/Sudo

Offline

#5 2013-04-19 17:40:25

opt1mus
Member
From: UK
Registered: 2011-12-31
Posts: 197
Website

Re: [SOLVED] sudo's password not changed

Grant wrote:

Are you sure?
In that case, how can sudo get more permissions?
Infact sudo should get root's permissions (or maybe I'm wrong).

You're wrong, it shouldn't get root's permissions by default, otherwise what's the point. It's to control what users can and cannot do whilst logging activity;

Have a good Read of The Fine Manual, that cecar posted.

Offline

#6 2013-04-19 17:46:27

Grant
Member
From: Italy
Registered: 2012-12-15
Posts: 216

Re: [SOLVED] sudo's password not changed

But how can sudo get every permissions, if I don't give root's password when asked?
If I use my password to run programs as root, it isn't a little insecure?
It is repetitive, because I'm already logged, and so it's like a second log in.


I am not a native speaker. If you see a mistake, please report it to me via private message. Thank you.

Offline

#7 2013-04-19 17:48:51

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 5,888
Website

Re: [SOLVED] sudo's password not changed

It's to confirm that you are who you are logged in as, and no, say Mr. Stranger who has taken advantage of you being away from your keyboard.

You can change sudo to prompt for root's password if you want, I prefer it. The sudoers manpage explains how.


Sakura:-
Mobo: ASUS P8Z77-V PRO // Processor: Intel Core i7-3770K 3.4GHz // GFX: nVidia GeForce GTX 970 Ti // RAM: 32GB (4x 8GB) Corsair DDR3 (@ 2133MHz) // Storage: 1x 3TB Seagate SATAII 5x 1TB Samsung SATAII, 2x 120GB Corsair SSD

Making lemonade from lemons since 2015.

Offline

#8 2013-04-19 18:03:11

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 14,738
Website

Re: [SOLVED] sudo's password not changed

A new user could *try* to run sudo, and use their own user password.  This will succeed if they have been added to the sudoers file to have such an ability - it will fail otherwise.

If sudoers needed to know the root password, then there would be no reason for sudo.  Sudo is a tool to allow non root users to have particular elevated priviledges.  The sudoers file defines which things they can do (if any).

Did you not (as root) edit your sudoers file and add your user to it?


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#9 2013-04-19 18:28:26

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 13,776

Re: [SOLVED] sudo's password not changed

Grant wrote:

But how can sudo get every permissions, if I don't give root's password when asked?.

from my system:

ewaller$@$odin ~ 1001 %ls -l $(which sudo)
-rwsr-xr-x 1 root root 116888 Apr 11 16:03 /usr/bin/sudo
ewaller$@$odin ~ 1002 %

This shows the permissions for the program sudo.  Note the 's' in the permissions (-rwsr-xr-x)  That 's' means that when 'root' installed the program, he set the sticky bit; that bit tells the program to always run with the permissions of the owner.  Sudo always runs as root, no matter who invokes it.  The sudoers file tells that program which privileges are to be extended to which users, and how those users must identify themselves.

One might set the system up so that any user may shut the system down without any authentication.   
One might set the system up so that members of the 'wheel' group can do anything without authentication.
One might set the system up so that members of the 'wheel' group can do anything, but only after they prove who they are by entering their password.

Most of us use the last case.  I think that is the default.

Last edited by ewaller (2013-04-19 20:44:04)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
You assume people are rational and influenced by evidence.  You must not work with the public much. -- Trilby
----
How to Ask Questions the Smart Way

Offline

#10 2013-04-20 00:43:25

hobarrera
Member
From: CABA, Argentina
Registered: 2011-04-12
Posts: 322
Website

Re: [SOLVED] sudo's password not changed

Grant wrote:

But how can sudo get every permissions, if I don't give root's password when asked?
If I use my password to run programs as root, it isn't a little insecure?
It is repetitive, because I'm already logged, and so it's like a second log in.

It will only grant those permissions if the running user is listed in the sudoers file.
It's not a second login, it's granting full permission to a program. This should also be necesary for system-level configuration, and package installation.

If you insist on not typing your password when running sudo, you can configure it not to ever ask a password (though I wouldn't recomend you do this unless you're really sure what you're doing).


GPG Key | AUR packages | github

caffeine-ng: Temporarily disable screensaver/sleeping with a simple click.

Offline

#11 2013-04-20 12:21:12

Grant
Member
From: Italy
Registered: 2012-12-15
Posts: 216

Re: [SOLVED] sudo's password not changed

Thanks everyone. Now I have understood how sudo works.
I wish to you a nice day.


I am not a native speaker. If you see a mistake, please report it to me via private message. Thank you.

Offline

#12 2013-04-20 12:42:37

hobarrera
Member
From: CABA, Argentina
Registered: 2011-04-12
Posts: 322
Website

Re: [SOLVED] sudo's password not changed

You're welcome! Don't forget to mark the thread as [SOLVED]. smile


GPG Key | AUR packages | github

caffeine-ng: Temporarily disable screensaver/sleeping with a simple click.

Offline

Board footer

Powered by FluxBB