[SOLVED] "su" to another username without password

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] "su" to another username without password

Postby magfan » Sep 10th, '15, 10:37

On our mga5 workstation we have a user (not root) who can become another user (except root) without being asked for a password just by typing "su [username]". How can this be? And even more important: How can this be changed?
Last edited by magfan on Sep 14th, '15, 15:29, edited 1 time in total.
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: "su" to another username without password

Postby doktor5000 » Sep 10th, '15, 11:01

Please provide at least the output of
Code: Select all
id
for that user and the contents of /etc/pam.d/su of that system.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18059
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: "su" to another username without password

Postby magfan » Sep 10th, '15, 11:09

Code: Select all
$ id
uid=1002(spm) gid=100(users) Gruppen=100(users),1001(nas),1002(spm)
$ cat /etc/pam.d/su
#%PAM-1.0
auth            sufficient      pam_rootok.so
# Uncomment the following line to implicitly trust users in the "wheel" group.
#auth           sufficient      pam_wheel.so trust use_uid
# Uncomment the following line to require a user to be in the "wheel" group.
#auth           required        pam_wheel.so use_uid
auth            include         system-auth
account         sufficient      pam_succeed_if.so uid = 0 use_uid quiet
account         include         system-auth
password        include         system-auth
session         include         system-auth
session         optional        pam_xauth.so
$
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: "su" to another username without password

Postby doktor5000 » Sep 10th, '15, 21:58

And you su to one of the users in the "users" group?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18059
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: "su" to another username without password

Postby magfan » Sep 11th, '15, 11:23

Yes. User "spm" can su to any user in the users group without being asked for a password.
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: "su" to another username without password

Postby magfan » Sep 14th, '15, 15:28

Once every user changed or just re-entered his/her own password the problem was gone.
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest