# su asks for password

**URL:** <https://forums.suse.com/t/su-asks-for-password/22612>\
**Category:** SLES Configure-Administer\
**Created:** [May 10, 2012, 6:20pm UTC](https://forums.suse.com/t/su-asks-for-password/22612 "2012-05-10T18:20:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![joea](https://avatars.discourse-cdn.com/v4/letter/j/b38774/32.png) [@joea](https://forums.suse.com/u/joea)\
**Post date:** [May 10, 2012, 6:20pm UTC](https://forums.suse.com/t/su-asks-for-password/22612/1 "2012-05-10T18:20:06Z")

</div>

SLES 10 SP3 - cannot get su to stop asking for password. Have to enter root password.

Below is a snippet of /etc/sudoers, which seems to work on another box. Thanks for any assistance

* * *

# In the default (unconfigured) configuration, sudo asks for the root password.

# This allows use of an ordinary user account for administration of a freshly

# installed system. When configuring sudo, delete the two

# following lines:

#Defaults targetpw # ask for the password of the target user i.e. root  
#ALL ALL=(ALL) ALL # WARNING! Only use this together with ‘Defaults targetpw’!

# Runas alias specification

# User privilege specification

root ALL=(ALL) ALL  
local-user ALL=(ALL) NOPASSWD: ALL

* * *

Having NOPASSWD: in or out does not seem to matter.

joe a.

---

<div class="post-metadata">

**Author:** ![joea](https://avatars.discourse-cdn.com/v4/letter/j/b38774/32.png) [@joea](https://forums.suse.com/u/joea)\
**Post date:** [May 10, 2012, 8:57pm UTC](https://forums.suse.com/t/su-asks-for-password/22612/2 "2012-05-10T20:57:50Z")

</div>

Never mind. Working as Designed.

[QUOTE=joea;4502]SLES 10 SP3 - cannot get su to stop asking for password. Have to enter root password.

Below is a snippet of /etc/sudoers, which seems to work on another box. Thanks for any assistance

* * *

# In the default (unconfigured) configuration, sudo asks for the root password.

# This allows use of an ordinary user account for administration of a freshly

# installed system. When configuring sudo, delete the two

# following lines:

#Defaults targetpw # ask for the password of the target user i.e. root  
#ALL ALL=(ALL) ALL # WARNING! Only use this together with ‘Defaults targetpw’!

# Runas alias specification

# User privilege specification

root ALL=(ALL) ALL  
local-user ALL=(ALL) NOPASSWD: ALL

* * *

Having NOPASSWD: in or out does not seem to matter.

joe a.[/QUOTE]

---

<div class="post-metadata">

**Author:** ![J.M](https://avatars.discourse-cdn.com/v4/letter/j/db5fbb/32.png) [@J.M](https://forums.suse.com/u/J.M)\
**Post date:** [May 11, 2012, 10:45am UTC](https://forums.suse.com/t/su-asks-for-password/22612/3 "2012-05-11T10:45:27Z")

</div>

> [@joea;4504](#):
>
> Never mind. Working as Designed.

Indeed, if you like to use what you defined in /etc/sudoers you have to use sudo, not su.
