Re: sudo -u environment help

2014-05-28 Thread Craig R. Skinner
FYI;- The sudo users mailing list quickly said the 3 issues I identified are known bugs, which have been fixed in newer sudo versions. http://www.sudo.ws/sudo/stable.html The current stable release of sudo is 1.8.10p3 $ sudo -V Sudo version 1.7.2p8 $ uname -a OpenBSD teak.britvault.co.uk 5.4

Re: sudo -u environment help

2014-04-11 Thread Craig R. Skinner
Would this be better asked on tech@? On 2014-04-08 Tue 09:26 AM |, Craig R. Skinner wrote: To clarify, there are no ~/. shell dot files. $PATH umask are set in /etc/login.conf $MAIL is the default set by login(1) /etc/profile sources /etc/ksh.kshrc, which just sets $PS1, window decor

Re: sudo -u environment help

2014-04-08 Thread Craig R. Skinner
To clarify, there are no ~/. shell dot files. $PATH umask are set in /etc/login.conf $MAIL is the default set by login(1) /etc/profile sources /etc/ksh.kshrc, which just sets $PS1, window decor some aliases, nothing major. This arrangement works fine when logging in directly, or via sudo su

Re: sudo -u environment help

2014-04-08 Thread Andres Perera
On Fri, Apr 4, 2014 at 6:00 AM, Craig R. Skinner skin...@britvault.co.uk wrote: Hi, When sudo'ing to another user, how can I obtain all of their environment settings as they receive when logging in themselves? When I use sudo in this manner, settings such as $PATH, $MAIL umask aren't being

Re: sudo -u environment help

2014-04-08 Thread Andres Perera
On Tue, Apr 8, 2014 at 7:17 AM, Andres Perera andre...@zoho.com wrote: On Fri, Apr 4, 2014 at 6:00 AM, Craig R. Skinner skin...@britvault.co.uk wrote: Hi, When sudo'ing to another user, how can I obtain all of their environment settings as they receive when logging in themselves? When I

Re: sudo -u environment help

2014-04-08 Thread Craig R. Skinner
On 2014-04-08 Tue 07:17 AM |, Andres Perera wrote: You do that with `sudo -c - -l`: $ sudo -c - -i 'ulimit -a; env' eb $ diff -u ea e --- ea Tue Apr 8 07:13:11 2014 +++ eb Tue Apr 8 07:14:22 2014 @@ -1,29 +1,24 @@ -LOGNAME=a +LOGNAME=root Also see `use_loginclass` in sudoers(5).

Re: sudo -u environment help

2014-04-05 Thread Shawn K. Quinn
On Fri, Apr 4, 2014, at 12:05 PM, David Coppa wrote: On Fri, Apr 4, 2014 at 7:01 PM, Todd norr...@gmail.com wrote: I think this should work sudo su - user Sure, it works. I often use it. sudo -s user should work as well I think. -- Shawn K. Quinn skqu...@rushpost.com

Re: sudo -u environment help

2014-04-05 Thread Craig R. Skinner
On 2014-04-04 Fri 12:01 PM |, Todd wrote: I think this should work sudo su - user Yes, going via root works. How do I get the same user environment with something like: sudo -H -i -u username See below: When I use sudo in this manner, settings such as $PATH, $MAIL umask aren't

sudo -u environment help

2014-04-04 Thread Craig R. Skinner
Hi, When sudo'ing to another user, how can I obtain all of their environment settings as they receive when logging in themselves? When I use sudo in this manner, settings such as $PATH, $MAIL umask aren't being honoured: $ echo $LOGNAME; echo $PATH; echo $MAIL; umask craig

Re: sudo -u environment help

2014-04-04 Thread Vijay Sankar
Quoting Craig R. Skinner skin...@britvault.co.uk: Hi, When sudo'ing to another user, how can I obtain all of their environment settings as they receive when logging in themselves? When I use sudo in this manner, settings such as $PATH, $MAIL umask aren't being honoured: $ echo $LOGNAME;

Re: sudo -u environment help

2014-04-04 Thread Vadim Zhukov
sudo -i ? 04.04.2014 14:31 пользователь Craig R. Skinner skin...@britvault.co.uk написал: Hi, When sudo'ing to another user, how can I obtain all of their environment settings as they receive when logging in themselves? When I use sudo in this manner, settings such as

Re: sudo -u environment help

2014-04-04 Thread Todd
I think this should work sudo su - user On Fri, Apr 4, 2014 at 8:52 AM, Vadim Zhukov persg...@gmail.com wrote: sudo -i ? 04.04.2014 14:31 ÐÏÌØÚÏ×ÁÔÅÌØ Craig R. Skinner skin...@britvault.co.uk ÎÁÐÉÓÁÌ: Hi, When sudo'ing to another user, how can I obtain all of their environment

Re: sudo -u environment help

2014-04-04 Thread David Coppa
On Fri, Apr 4, 2014 at 7:01 PM, Todd norr...@gmail.com wrote: I think this should work sudo su - user Sure, it works. I often use it.