Re: PATH nfg after su

2020-10-24 Thread tomas
On Sat, Oct 24, 2020 at 07:12:20PM +, Andrew M.A. Cater wrote: [...] > sudo su - has one advantage: it gives you root's path and root's home > directory - so you end up in /home/root or wherever root's > home is set to. Otherwise, you end up, potentially, in the calling user's > home direct

Re: PATH nfg after su

2020-10-24 Thread Andrew M.A. Cater
On Fri, Oct 23, 2020 at 06:49:52PM +0100, Tixy wrote: > On Fri, 2020-10-23 at 15:11 +0200, Sven Hartge wrote: > > Tixy wrote: > > > On Fri, 2020-10-23 at 08:19 -0400, Greg Wooledge wrote > > > > Using "sudo su -" is a new one to me. Not only are you > > > > wastefully > > > > running two programs

Re: PATH nfg after su

2020-10-23 Thread mick crane
On 2020-10-23 19:01, Dan Ritter wrote: I first used Linux in 1992, 13 or 14 months after Linus started writing it. sudo was already 12 years old. "Where do you want to go today" did it for me but I had such a lot of trouble shifting head into gear. Never really managed. -- Key ID4BFEBB3

Re: PATH nfg after su

2020-10-23 Thread Dan Ritter
Tixy wrote: > > Thanks. Debian has su installed as part of a required package so I > never bothered installing sudo, it just seemed to be an Ubuntu thing. Robert Coggeshall and Cliff Spencer wrote the original subsystem around 1980 at the Department of Computer Science at SUNY/Buffalo. Robert Co

Re: PATH nfg after su

2020-10-23 Thread Tixy
On Fri, 2020-10-23 at 15:11 +0200, Sven Hartge wrote: > Tixy wrote: > > On Fri, 2020-10-23 at 08:19 -0400, Greg Wooledge wrote > > > Using "sudo su -" is a new one to me. Not only are you > > > wastefully > > > running two programs when you only need one. > > It's useful (essential?) if you want

Re: PATH nfg after su

2020-10-23 Thread Sven Hartge
Tixy wrote: > On Fri, 2020-10-23 at 08:19 -0400, Greg Wooledge wrote >> Using "sudo su -" is a new one to me. Not only are you wastefully >> running two programs when you only need one. > It's useful (essential?) if you want a root shell when there's no root > password set like on Ubuntu (and o

Re: PATH nfg after su

2020-10-23 Thread Greg Wooledge
On Fri, Oct 23, 2020 at 01:30:11PM +0100, Tixy wrote: > On Fri, 2020-10-23 at 08:19 -0400, Greg Wooledge wrote > [...] > > Using "sudo su -" is a new one to me. Not only are you wastefully > > running two programs when you only need one. > [...] > > It's useful (essential?) if you want a root she

Re: PATH nfg after su

2020-10-23 Thread Tixy
On Fri, 2020-10-23 at 08:19 -0400, Greg Wooledge wrote [...] > Using "sudo su -" is a new one to me. Not only are you wastefully > running two programs when you only need one. [...] It's useful (essential?) if you want a root shell when there's no root password set like on Ubuntu (and optionally

Re: PATH nfg after su

2020-10-23 Thread Greg Wooledge
On Fri, Oct 23, 2020 at 12:15:24PM +, Andrew M.A. Cater wrote: > Behaviour changed in Buster - su - is now required. [Likewise sudo su - if > you use sudo] That's silly. Just use "sudo -i" if you want a root login shell, or "sudo -s" if you want a normal root shell (roughly equivalent to wha

Re: PATH nfg after su

2020-10-23 Thread Andrew M.A. Cater
On Thu, Oct 22, 2020 at 11:41:07PM -0400, Bob Bernstein wrote: > On Thu, 22 Oct 2020, Bob Bernstein wrote: > > > PATH=/home/bob/bin:/usr/local/bin:/usr/bin:/bin:/usr/games > > I examined su(1) and learned that one solution for me is to invoke su with > the '-l' argument, which creates a 'login' s

Re: PATH nfg after su

2020-10-23 Thread Greg Wooledge
On Thu, Oct 22, 2020 at 11:41:07PM -0400, Bob Bernstein wrote: > On Thu, 22 Oct 2020, Bob Bernstein wrote: > > > PATH=/home/bob/bin:/usr/local/bin:/usr/bin:/bin:/usr/games > > I examined su(1) and learned that one solution for me is to invoke su with > the '-l' argument, which creates a 'login' s

Re: PATH nfg after su

2020-10-22 Thread Bob Bernstein
On Thu, 22 Oct 2020, Bob Bernstein wrote: PATH=/home/bob/bin:/usr/local/bin:/usr/bin:/bin:/usr/games I examined su(1) and learned that one solution for me is to invoke su with the '-l' argument, which creates a 'login' shell in the new env. This sets, for me, the PATH to '/usr/local/sbin:/u

PATH nfg after su

2020-10-22 Thread Bob Bernstein
Here I've been sailing along blissfully unaware that when on those rare occasions I execute su in a terminal, say to tweak my exim4 config, that I had a pretty much useless PATH in the env after su-ing: PATH=/home/bob/bin:/usr/local/bin:/usr/bin:/bin:/usr/games So I could not, say, execute 's