AW: sudo Configuration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Andrew,

I have no idea, if there's a sudo-config for the PATH-env ... so I'd like to write my own one:

   [root@hornet ~]# cat /bin/mysudo
   #!/bin/bash

   OPATH=$PATH               # save the original PATH
   PATH=/usr/sbin:$PATH      # append some for root
   sudo $*                   # execute the command(line)
   PATH=$OPATH               # and restore the old PATH

To activate this, just set an alias in the ~.profile(s) or /etc/profile, like:
   alias sudo=/bin/mysudo

Hope it helps...

cu,
Joe

>>>>> AMeadows@xxxxxxx 04/12/06 1:45 pm >>>
>> I am attempting to configure sudo on a RH AS v3 r4 server. The version
>> of sudo installed is 1.6.7p5. I would like to pass the $PATH
>> environment
>> of root to the sudoer when they run a sudo command. If User A runs
>> sudo
>> ifconfig, usera receives an error saying that ifconfig cannot be
>> found.
>> I know that this is due to the fact that the /sbin path is not in the
>> user A's profile. Is it possible to pass the .profile info from root
>> to
>> user A so this command can run successfully?
>>
>>
>>
>> Thanks in Advance,
>>
>>
>>
>> Andrew
>>
>>
>>
>>
>> ********************************************
>> This message is intended only for the use of the Addressee and
>> may contain information that is PRIVILEGED and CONFIDENTIAL.
>>
>> If you are not the intended recipient, you are hereby notified
>> that any dissemination of this communication is strictly prohibited.
>>
>> If you have received this communication in error, please erase
>> all copies of the message and its attachments and notify us
>> immediately.
>>
>> Thank you.
>> ********************************************
>> --
>> redhat-list mailing list
>> unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
>> https://www.redhat.com/mailman/listinfo/redhat-list
>>
>> --
>> redhat-list mailing list
>> unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
>> https://www.redhat.com/mailman/listinfo/redhat-list
>>
>
>
>-- 
>Mike Burger
>http://www.bubbanfriends.org
>
>Visit the Dog Pound II BBS
>telnet://dogpound2.citadel.org or http://dogpound2.citadel.org:2000
>
>To be notified of updates to the web site, visit
>http://www.bubbanfriends.org/mailman/listinfo/site-update, or send a
>message to:
>
>site-update-request@xxxxxxxxxxxxxxxxx
>
>with a message of:
>
>subscribe
>
>-- 
>redhat-list mailing list
>unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
>https://www.redhat.com/mailman/listinfo/redhat-list

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux