On Sat, 2011-07-23 at 17:53 -0400, David A. De Graaf wrote:
> As I understand it (from the golden years of UNIX), what happens when
> I type   /bin/su - dad   is roughly this:
> - the shell forks, creating a child with all of the parent's exported
>   environment but not the rest, and including stdin, stdout, and
> stderr.

RTFM. According to the info page on su:

`-'
`-l'
`--login'
     Make the shell a login shell.  This means the following.  Unset all
     environment variables except `TERM', `HOME', and `SHELL' (which
     are set as described above), and `USER' and `LOGNAME' (which are
     set, even for the super-user, as described above), and set `PATH'
     to a compiled-in default value.  Change to USER's home directory.
     Prepend `-' to the shell's name, intended to make it read its
     login startup file(s). When this option is given, /etc/pam.d/su-l
     PAM file is used instead of the default one.

IOW the DISPLAY environment variable will not be passed to the child
shell in this case.

poc

-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

Reply via email to