Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
unable to su without password[solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1158

PostPosted: Thu Dec 01, 2016 11:38 am    Post subject: unable to su without password[solved] Reply with quote

I'm trying to configure my newly installed system to su without prompting me for password, I have the following:
/etc/pam.d/su:
auth sufficient pam_rootok.so
#auth required pam_wheel.so use_uid
auth include system-auth
account include system-auth
password include system-auth
session include system-auth
session required pam_env.so
session optional pam_xauth.so
auth sufficient pam_wheel.so use_uid trust

[ebuild R ] sys-apps/shadow-4.1.5.1-r1::gentoo USE="pam -acl -audit -cracklib -nls (-selinux) -skey -xattr" 0 KiB


this used to work just fine in the past, this installation it is not working :(

thanks


Last edited by Adel Ahmed on Thu Dec 01, 2016 1:30 pm; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 21328
Location: here

PostPosted: Thu Dec 01, 2016 1:06 pm    Post subject: Reply with quote

Try with sudo, isn't a good idea change su configuration
Code:
[I] app-admin/sudo
     Available versions:  1.8.15-r1 1.8.16 ~1.8.17_p1 ~1.8.18_p1 **1.8.19_beta1 **9999 {ldap nls offensive pam selinux +sendmail skey}
     Installed versions:  1.8.16(10:03:58 22. 11. 16)(ldap nls pam sendmail -offensive -selinux -skey)
     Homepage:            http://www.sudo.ws/
     Description:         Allows users or groups to run commands as other users

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1158

PostPosted: Thu Dec 01, 2016 1:08 pm    Post subject: Reply with quote

I would much rather not, security is not an issue on this machine, it is very convenient and time saving to just su to root( I open up terminals very frequently during the day)
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 21328
Location: here

PostPosted: Thu Dec 01, 2016 1:18 pm    Post subject: Reply with quote

You can change /etc/sudoers with
Code:
<your_user> ALL=(ALL) NOPASSWD: ALL

and then with sudo su you can open a root terminal without password
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1158

PostPosted: Thu Dec 01, 2016 1:29 pm    Post subject: Reply with quote

I've modified the file as follows:

auth sufficient pam_wheel.so use_uid trust
auth sufficient pam_rootok.so
#auth sufficient pam_wheel.so use_uid
auth include system-auth
account include system-auth
password include system-auth
session include system-auth
session required pam_env.so
session optional pam_xauth.so

and everything is working now
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum