[X-Unix] sudo -s behavior changed in 10.5?

David Ledger dledger at ivdcs.demon.co.uk
Thu Feb 21 11:56:52 PST 2008


At 08:19 -0600 21/2/08, Eric F Crist wrote:
>What's always worked for me is to sudo <favorite_shell_here>.  In my 
>case, I use csh, so I get my environment and everything with:
>
>% sudo csh

I take things a stage further (I use ksh) and install somewhere on my 
PATH a link called -ksh to /bin/ksh (or wherever it is on that 
system). I can then have an alias
   soot='sudo -p "Password: " -H -- -ksh -o vi'
When the shell starts, it sees the leading '-' of its ARGV[0] and 
becomes a login shell, sourcing all the normal login shell stuff.

David


-- 
David Ledger - Freelance Unix Sysadmin in the UK.
HP-UX specialist of hpUG technical user group (www.hpug.org.uk)
david.ledger at ivdcs.co.uk
www.ivdcs.co.uk


More information about the X-Unix mailing list