<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Stephen Carville wrote:
<blockquote cite="mid200811171059.11486.scarville@landam.com"
 type="cite">
  <pre wrap="">On Monday 17 November 2008 00:49, <a class="moz-txt-link-abbreviated" href="mailto:edwardspl@ita.org.mo">edwardspl@ita.org.mo</a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Dear All,

For the sudo setting ( visudo ) :

User_Alias      SYSADM = manager

Cmnd_Alias    NOROOT = !/usr/bin/passwd root
Cmnd_Alias    USER = /usr/sbin/adduser, /usr/bin/passwd, /bin/chown,
/usr/sbin/userdel

SYSADM    MH = (ALL)    NOROOT,USER

BUT the test result as the following :

[manager@xxx ~]$ sudo passwd root
Changing password for user root.
New UNIX password:

So, what wrong of the config ?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
I think the exception has to be after the allowed rule:

SYSADM    MH = (ALL)    USER,NOROOT

It's been while since I checked that part of the code...</pre>
</blockquote>
Hello to you,<br>
<br>
Just test as the following rule is successfuly:<br>
<pre wrap="">SYSADM    MH = (ALL)    USER,NOROOT</pre>
BUT there is another problem of it ( I think it is a bug of sudo ).....<br>
<br>
When you enter "sudo passwd" without the option (eg:userid):<br>
<br>
[manager@xxx ~]$ sudo passwd<br>
Changing password for user root.<br>
New UNIX password:<br>
<br>
OH...the user manager who can change root password ?<br>
<br>
So, is there any solution for this case of problem ?<br>
<br>
Thanks !<br>
<br>
Edward.<br>
</body>
</html>