[sudo-users] sudo -s giving login shell

Pierre-Yves Ritschard pierre-yves.ritschard at oxalide.com
Wed Mar 16 11:47:57 EST 2005

Todd C. Miller wrote:
> In message <42380026.1040607 at oxalide.com>
> 	so spake Pierre-Yves Ritschard (pierre-yves.ritschard):
>>Users here are accustommed to using sudo -s to get a root shell.
>>But it doesn't load the /etc/profile as sudo doesn't load a login shell.
>>sudo ksh -l works fine but I'm wondering if there is a way of making 
>>sudo -s start a login shell.
> In sudo 1.6.8 and above you can use "sudo -i" for this.
>  - todd

Well actually I wasn't exactly looking for this, but I since after 
looking at the source there really is no way to do this, I'll be going 
with -i (which i had seen in the manpage already).

I was looking at something that would append -l to the current shell 
spawning. Thanks anyway, it works for me.

More information about the sudo-users mailing list