On Sun, Apr 07, 2002 at 07:35:57PM -0400, JPS wrote:
> There is something that has always bothered me about the scripts in
> `/etc/init.d'. Every once in a while I attempt to execute one of these
> scripts while logged in as a non-root user. For example, I might type
> `/etc/init.d/foobar restart'
In article <[EMAIL PROTECTED]>,
JPS <[EMAIL PROTECTED]> wrote:
>There is something that has always bothered me about the scripts in
>`/etc/init.d'. Every once in a while I attempt to execute one of these
>scripts while logged in as a non-root user.
This is Unix. It gives you enough rope to hang y
On Mon, Apr 08, 2002 at 03:36:17AM -0300, Henrique de Moraes Holschuh wrote:
> On Sun, 07 Apr 2002, JPS wrote:
> > `/etc/init.d'. Every once in a while I attempt to execute one of these
> > scripts while logged in as a non-root user. For example, I might type
> ...
>
> The problem is, the initscri
On Sun, 07 Apr 2002, JPS wrote:
> `/etc/init.d'. Every once in a while I attempt to execute one of these
> scripts while logged in as a non-root user. For example, I might type
...
The problem is, the initscript should actually check if it has the rights it
needs, if it is to do what you want...
$EUID is a bash-ism; you'd need to run "id" instead.
Also, the echo should include the name of the script...
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
At 19:35 -0400 07 Apr 2002, JPS <[EMAIL PROTECTED]> wrote:
> me to raise my awareness!). How about prefacing the scripts in
> `/etc/init.d' with something along the lines of:
>
> if [ ! $EUID == 0 ]; then
> echo "Sorry, this script must run with root privileges."
> if
If
On Sun, Apr 07, 2002 at 07:35:57PM -0400, jpstewart wrote:
> if [ ! $EUID == 0 ]; then
> echo "Sorry, this script must run with root privileges."
> if
Oops. I forget to add the `exit 69' or whatever error code.
--
Jean-Paul Stewart
pgpnpQJPMuk43.pgp
Description: PGP sig
There is something that has always bothered me about the scripts in
`/etc/init.d'. Every once in a while I attempt to execute one of these
scripts while logged in as a non-root user. For example, I might type
`/etc/init.d/foobar restart' while having the privileges of user `jps'
(uid=1000). Normall
8 matches
Mail list logo