On Wed, Jan 21, 2004 at 08:12:50AM +0330, Alikhani wrote: > Date: Wed, 21 Jan 2004 08:12:50 +0330 > From: Alikhani <[EMAIL PROTECTED]> > Subject: Re: sudo > To: [EMAIL PROTECTED] > > Hi Rechard, > > Thank you very much for your guidance. I did something you said ,but > when I add the > /usr/bin/sudo /usr/sbin/useradd ..... > to my script and when the admin run it , system says , > /usr/bin/sudo: /etc/sudoers is mode 0440, should be 0640 > and when I chmod 0640 /etc/sudoers as root , admin can use it > successfully, but when admin want to use userdel command , system says: > /usr/local/bin/sudo: /etc/sudoers is mode 0640, should be 0440 > i add in /etc/sudoers this line for admin > admin ALL= /usr/bin/ud > ud is the name of my script. I want to know what is the problem and how > can I solve it?
a few questions: 1) why would `sudo` be in /usr/local/bin/sudo _AND_ /usr/bin/sudo 2) I ASSuME that in your $PATH you have /usr/local/bin/ _BEFORE_ /usr/bin 3) Please check the following #!/bin/sh # sudo sanity check # find this luser's PATH echo $PATH # look for both sudo's and their MD5 /bin/ls -la /usr/bin/sudo /usr/local/bin/sudo /usr/bin/md5sum /usr/bin/sudo /usr/local/bin/sudo # see which one this luser is using # (probably different for root and admin) which sudo # reported mode-error-string differs from mine, check it out. /usr/bin/strings /usr/bin/sudo | /usr/bin/grep -i mode /usr/bin/strings /usr/local/bin/sudo | /usr/bin/grep -i mode # EoJ Note that I tend to use "fully qualified paths" in my scripts, (or define $PATH explicitly at the start of the script) probably better to take this off-list, so that we don't bore the others Richard -- Vegetarians eat vegetables. That's OK. It's the Humanitarians I'm worried about. Have a nice day ;-) Richard Higson mailto:[EMAIL PROTECTED]
