determining sudo access
- From: Donald Russell <russell.don@xxxxxxxxx>
- Date: Wed, 19 Jan 2011 14:34:55 -0800
In /etc/profile.d/local.sh I'd like to modify the PATH env variable to
include /sbin /usr/sbin and /usr/local/sbin but only if the user has sudo
access.
I can use sudo -l but that prompts for the user password unless the user is
configured for NOPASSWD in sudo.
Is there a reasonably convenient way to do this? I suppose I could just
always included those directories at the end of the PATH... then if users
try a restricted command they'll get "requires root" instead of "command not
found".
What do other people do?
Ideally this should work via ssh as well
i.e. from one machine to another I often do something like
ssh -t <machine> sudo sysctl -a
Which fails unless the path is set correctly on the remote machine...
otherwise I have to specify the full path for sudo and sysctl.
--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
- Follow-Ups:
- Re: determining sudo access
- From: Tim
- Re: determining sudo access
- Prev by Date: Re: evolution-alarm-notify doesn't start on fedora 14
- Next by Date: Re: evolution-alarm-notify doesn't start on fedora 14
- Previous by thread: Fedora + BigBlueButton = win (multi conference chat, voice and video server for meetings/teachings)
- Next by thread: Re: determining sudo access
- Index(es):
Relevant Pages
|