Professional Web Applications Themes

SUDO - can't execute chmod command - Linux / Unix Administration

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...

  1. #1

    Default SUDO - can't execute chmod command

    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

    kona_iron@yahoo.fr Guest

  2. #2

    Default Re: SUDO - can't execute chmod command

    fr <fr> schrieb: 
    ^^^^^^^^^^^^^^^^^ 
    ^^^^^^^^^^^^^^^^

    The arguments are different.

    cu
    ulf


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

    Ulf Guest

  3. #3

    Default Re: SUDO - can't execute chmod command

    On 3 Mar 2005 01:30:22 -0800, fr
    <fr> wrote: 
    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?
    Bill Guest

Similar Threads

  1. sudo command
    By Huy Pham in forum Ubuntu
    Replies: 13
    Last Post: February 5th, 12:29 AM
  2. Submit command to execute
    By stuberry in forum Macromedia Director Basics
    Replies: 0
    Last Post: April 15th, 11:06 AM
  3. RUN/execute a Command-Line command from an ASP page
    By Lucas Cowald in forum ASP.NET Building Controls
    Replies: 1
    Last Post: October 22nd, 04:26 PM
  4. RUN/execute a Command-Line command from an ASP page.
    By Lucas Cowald in forum ASP Components
    Replies: 7
    Last Post: October 22nd, 01:08 PM
  5. how to execute command line in ASP
    By david Wilton in forum ASP
    Replies: 2
    Last Post: August 11th, 08:16 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139