# unable to su without password[solved]

## Adel Ahmed

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  :Sad: 

thanksLast edited by Adel Ahmed on Thu Dec 01, 2016 1:30 pm; edited 1 time in total

----------

## fedeliallalinea

Try with sudo, isn't a good idea change su configuration

```
[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

```

----------

## Adel Ahmed

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)

----------

## fedeliallalinea

You can change /etc/sudoers with

```
<your_user> ALL=(ALL) NOPASSWD: ALL
```

and then with sudo su you can open a root terminal without password

----------

## Adel Ahmed

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

----------

