Wednesday, July 14, 2010

Sudo without fullpath

This is little tricky to set sudo without fullpath, we can use alias to get it.
Open file .bashrc then add this line;
alias sudo='PATH=$PATH:/usr/kerberos/sbin:/usr/local/sbin:/usr/sbin:/sbin
/usr/bin/sudo'

or add this line
export PATH=$PATH:/usr/sbin:/sbin
Save and exit.
To check please logout then open console/terminal again.

Done, smoga bermanfaat

No comments: