[Bro] how to run as non-root user?
jrlee at lbl.gov
Fri Jul 15 15:09:26 PDT 2005
-----BEGIN PGP SIGNED MESSAGE-----
On my linux (debian) system, su shows this:
jason at foobar[3:07pm](205)> su -l foobar
su: invalid option -- l
Usage: su [OPTS] [-] [username [ARGS]]
- make this a login shell
pass command to the invoked shell using its -c
-m, -p, --preserve-environment
do not reset environment variables, and keep the
use shell instead of the default in /etc/passwd
Christian Kreibich wrote:
> Hi there,
> I'm a bit puzzled about the problem as well, because according to
>>> Unknown option: `-l'
>>> Usage: tcsh [ -bcdefilmnqstvVxX ] [ argument ... ].
> -l should work. Also, at least with GNU coreutils it doesn't make any
> difference whether you use 'su -' or 'su -l'. su puts the basename of
> the shell of the user that is su'd to into argv, prefixed with '-' to
> indicate a login shell.
> Bash's and ksh's manpages mention this, tcsh's manpage is imprecise in
> saying argv has to *be* "-" but its code only checks for the first
> character being '-' (or the -l flag, as the manpage says).
> On Fri, 2005-07-15 at 13:48 -0700, Roger Winslow wrote:
>>As for bro.rc it was written for 'sh' and is compatible with 'bash'. That's why
>>the bang path is #!/bin/sh. bro.rc was written to work on the widest number of
>>systems possible and sh/bash are available everywhere.
>>I produced a simple shell script to simulate what you are referring to but was
>>unable to reproduce the error. brouser has a shell of /bin/tcsh and root has a
>>shell of /bin/tcsh
>>if [ "$1" = '1' ]; then
>> echo DONE
>> exit 0
>>su -l brouser -c "$0 1 < /dev/null"
>>If you can find more info on the error I will look into it further.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the Bro