[Bro] how to run as non-root user?
Christian Kreibich
christian at whoop.org
Fri Jul 15 14:29:58 PDT 2005
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[0], prefixed with '-' to
indicate a login shell.
Bash's and ksh's manpages mention this, tcsh's manpage is imprecise in
saying argv[0] has to *be* "-" but its code only checks for the first
character being '-' (or the -l flag, as the manpage says).
Best,
Christian.
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
>
> #!/bin/sh
>
> if [ "$1" = '1' ]; then
> echo DONE
> exit 0
> fi
>
> su -l brouser -c "$0 1 < /dev/null"
>
> If you can find more info on the error I will look into it further.
>
> Roger
--
________________________________________________________________________
http://www.cl.cam.ac.uk/~cpk25
http://www.whoop.org
More information about the Bro
mailing list