Unix administration - SUDO - can't execute chmod command

This is Interesting: Free IT Magazines  
Home > Archive > Unix administration > March 2005 > SUDO - can't execute chmod command





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author SUDO - can't execute chmod command
kona_iron@yahoo.fr

2005-03-03, 7:48 am

Hi,
My sudoers file contain the following line :
GRPA HOST = NOPASSWD: /bin/chmod 660 /etc/prod/MST.PWD

ls -al /bin/chmod
-r-xr-xr-x 1 root bin 18236 Jan 6 2000 /bin/chmod

When I call the command via sudo :
$ sudo /bin/chmod 660 /etc/adsm/TSM.PW
Password:
It prompt me the password.

If I use /usr/bin/chmod it works :
GRPA HOST = NOPASSWD: /usr/bin/chmod 660 /etc/prod/MST.PWD

ls -al /usr/bin/chmod
-r-xr-xr-x 1 root bin 18236 Jan 6 2000 /usr/bin/chmod

$ sudo /bin/chmod 660 /etc/adsm/TSM.PW
$

Is it a relation with the PATH ?
Because when I'm root :
$ which chmod
/usr/bin/chmod

Regards

Ulf Volmer

2005-03-03, 5:58 pm

kona_iron@yahoo.fr <kona_iron@yahoo.fr> schrieb:
> Hi,
> My sudoers file contain the following line :
> GRPA HOST = NOPASSWD: /bin/chmod 660 /etc/prod/MST.PWD

^^^^^^^^^^^^^^^^^
>
> ls -al /bin/chmod
> -r-xr-xr-x 1 root bin 18236 Jan 6 2000 /bin/chmod
>
> When I call the command via sudo :
> $ sudo /bin/chmod 660 /etc/adsm/TSM.PW

^^^^^^^^^^^^^^^^

The arguments are different.

cu
ulf


--
Ulf Volmer
u.volmer@u-v.de
www.u-v.de

Bill Marcum

2005-03-03, 5:58 pm

On 3 Mar 2005 01:30:22 -0800, kona_iron@yahoo.fr
<kona_iron@yahoo.fr> wrote:
> Hi,
> My sudoers file contain the following line :
> GRPA HOST = NOPASSWD: /bin/chmod 660 /etc/prod/MST.PWD
>
> ls -al /bin/chmod
> -r-xr-xr-x 1 root bin 18236 Jan 6 2000 /bin/chmod
>
> When I call the command via sudo :
> $ sudo /bin/chmod 660 /etc/adsm/TSM.PW
> Password:
> It prompt me the password.
>
> If I use /usr/bin/chmod it works :
> GRPA HOST = NOPASSWD: /usr/bin/chmod 660 /etc/prod/MST.PWD
>
> ls -al /usr/bin/chmod
> -r-xr-xr-x 1 root bin 18236 Jan 6 2000 /usr/bin/chmod
>
> $ sudo /bin/chmod 660 /etc/adsm/TSM.PW
> $
>
> Is it a relation with the PATH ?
> Because when I'm root :
> $ which chmod
> /usr/bin/chmod
>

Did you wait for sudo to time out between those two commands? What else
is in your sudoers file? Is there a line that refers to chmod without
specific arguments?
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com