Anthony Schneider wrote:
>
> Well, the reason I brought up $USER inheritance is that on linux, $USER is root
> after an su to root, whereas on FreeBSD, the $USER is the same as before the su.
> Not really thinking, I thought that perhaps that refleted the inherited $UID,
> which I was wrong about
Anthony Schneider wrote:
> Linux:
>
> anthony:/home/anthony:9% uname -a
> Linux lappy.slc.edu 2.2.17-21mdk #1 Thu Oct 5 13:16:08 CEST 2000 i686 unknown
> anthony:/home/anthony:10% su
> Password:
> [root@lappy anthony]# echo $USER
> root
> [root@lappy anthony]# exit
> anthony:/home/anthony:11%
Linux:
anthony:/home/anthony:9% uname -a
Linux lappy.slc.edu 2.2.17-21mdk #1 Thu Oct 5 13:16:08 CEST 2000 i686 unknown
anthony:/home/anthony:10% su
Password:
[root@lappy anthony]# echo $USER
root
[root@lappy anthony]# exit
anthony:/home/anthony:11% su -l
Password:
[root@lappy /root]# echo $USER
On Sun, 16 Dec 2001, Anthony Schneider wrote:
>Well, the reason I brought up $USER inheritance is that on linux, $USER
>is root after an su to root, whereas on FreeBSD, the $USER is the same
>as before the su.
[Line wrap at 72, please]
Excerpt from su(1):
---
By default, the environment is unmo
Well, the reason I brought up $USER inheritance is that on linux, $USER is root
after an su to root, whereas on FreeBSD, the $USER is the same as before the su.
Not really thinking, I thought that perhaps that refleted the inherited $UID,
which I was wrong about. Sorry for that.
You might want
> try it with an su -l, or explicitly set $USER to 'root', or even replace
> -n"$USER" with -n"root". this is all assuming that -n is specifying some
> sort of user privilege which you intend in this example to be root.
> if not, please forget this email. :)
> -Anthony.
I'm looking for a technic
Well, I'm not sure if you really want to be "creating" /dev/stdout, but the
$USER variable after an su is still your login name before the su.
anthony:/home/anthony:24% su
Password:
flack# echo $USER
anthony
flack#
try it with an su -l, or explicitly set $USER to 'root', or even replace
-n"$USE
No matter if root or not ...
root@titan[ttyp2]{139} ~ aps2file -D -P lp /etc/passwd
/usr/local/bin/aps2file: cannot create /dev/stdout: permission denied
andreas@titan[ttyp2]{1011} ~ aps2file -D -P lp /etc/passwd
/usr/local/bin/aps2file: cannot create /dev/stdout: permission denied
Cc: to FreeB
8 matches
Mail list logo