View previous topic :: View next topic |
Author |
Message |
Adel Ahmed Veteran
Joined: 21 Sep 2012 Posts: 1523
|
Posted: Thu Dec 01, 2016 11:38 am Post subject: unable to su without password[solved] |
|
|
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 |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30905 Location: here
|
Posted: Thu Dec 01, 2016 1:06 pm Post subject: |
|
|
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 |
|
|
Adel Ahmed Veteran
Joined: 21 Sep 2012 Posts: 1523
|
Posted: Thu Dec 01, 2016 1:08 pm Post subject: |
|
|
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 |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30905 Location: here
|
Posted: Thu Dec 01, 2016 1:18 pm Post subject: |
|
|
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 |
|
|
Adel Ahmed Veteran
Joined: 21 Sep 2012 Posts: 1523
|
Posted: Thu Dec 01, 2016 1:29 pm Post subject: |
|
|
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 |
|
|
|