Hello Any time I am running sudo, I should have full path to the command, for example sudo /sbin/ifconfig Is there any way to set the path for sudo ? Thanks
centos wrote:> Hello > > Any time I am running sudo, I should have full path to the command, > for example sudo /sbin/ifconfig > > Is there any way to set the path for sudo ?use this command to get that (instead of just sudo): sudo su - -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 252 bytes Desc: OpenPGP digital signature URL: <http://lists.centos.org/pipermail/centos/attachments/20070721/fd5637bc/attachment.sig>
And while you're at it, you might as well supply the full path to su. Quite a while ago I was taught to give the full path to su. This instruction was given with a warning that it's more secure in case a malicious user was able to get a command named 'su' into your path ahead of the binary you're intending to execute. I use: sudo /bin/su - Although, presumably under this logic, someone could have snuck another binary in named 'sudo', too. To take my own medicine, I should be doing: /usr/bin/sudo /bin/su - Putting my $0.02 in where it wasn't necessarily asked for, --bradoaks On 7/21/07, Johnny Hughes <johnny at centos.org> wrote:> centos wrote: > > Hello > > > > Any time I am running sudo, I should have full path to the command, > > for example sudo /sbin/ifconfig > > > > Is there any way to set the path for sudo ? > > use this command to get that (instead of just sudo): > > sudo su - > > > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos > > >
Modify your ~/.bash_profile and /sbin to your path, i.e., PATH=/sbin:/usr/sbin:$PATH:$HOME/bin On 7/22/07, centos <centos at unixplanet.biz> wrote:> > Hello > > Any time I am running sudo, I should have full path to the command, > for example sudo /sbin/ifconfig > > Is there any way to set the path for sudo ? > > Thanks > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos >-- Eduardo Dela Rosa -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20070722/3cd599ad/attachment.html>