root shell

Thilo Six T.Six at gmx.de
Fri Oct 5 20:32:43 UTC 2007


Thilo Six wrote the following on 05.10.2007 22:21

<<-snip->>

> this means nothing other than, in 'sudo <command>' you have to edit
> ~/.bashrc
> 
> in 'interactive' mode you have to edit /root/.bashrc.

Ooops, sorry:

$ sudo l
Password:
sudo: l: command not found

ok, that means alias not working within sudo (l is an known alias for root here).

man sudoers:
<-----------------------------------------------------------------------
always_set_home
               If set, sudo will set the HOME environment variable to the
               home directory of the target user (which is root unless the
               -u option is used).  This effectively means that the -H
               flag is always implied.  This flag is off by default.
----------------------------------------------------------------------->

but:
$ sudo -H l
Password:
sudo: l: command not found


hmmm.

It´s possible to have aliases with sudo (alias sv='sudo /usr/bin/vim') but
not sudo with aliases (sudo l) as it seems.

-- 
Thilo

key: 0x4A411E09





More information about the ubuntu-users mailing list