[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: su and init scripts



In article <[🔎] 11720CEF3853D011AC0C00A024B7A9E10DE47D@einstein.topsystem.de>,
Meskes, Michael <meskes@topsystem.de> wrote:
>When using su to change the user you do not get that user's login shell,
>but the one listed in the environment variable SHELL.

That must be a bug in your version of su, since the manpage states it will
use the shell in the password file. In fact, on a Debian 1.3 system:

[defiant:root](~)> echo $SHELL
/bin/bash
[defiant:root](~)> su miquels -c 'echo $SHELL'
/usr/bin/zsh
[defiant:root](~)> 

If I strace it:

setgid(10)                              = 0
setuid(2101)                            = 0
execve("/usr/bin/zsh", ["zsh", "-c", "echo $SHELL"], [/* 20 vars */]) = 0

A recent hamm system shows the same behaviour, btw

I realize all this doesn't help you very much (sorry) in a direct way but
hopefully it gives some more insight in the problem ..

Mike.
-- 
 Miquel van Smoorenburg |  Studying to be a technomage   <*>
    miquels@cistron.nl  | "May you live in interesting times"


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: