Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Sep 1998 01:36:09 -0700
From:      "Jordan Krushen" <jkrushen@home.com>
To:        <freebsd-questions@FreeBSD.ORG>
Subject:   Setuid shell script problem
Message-ID:  <000201bde1a0$82062660$0300000a@oblivion.purplemedia.com>

next in thread | raw e-mail | index | archive | help
I have a setuid shell script which doesn't seem to be running as the owner's
uid.. I'm sure I'm missing something, and I'm not sure what.  Could anyone
help this new-to-suid-scripts user get this to work? I know this a
script-specific thing.. if i copy /usr/bin/id to my home dir and make it run
suid root, I get:

uid=1000(wired) euid=0(root) gid=1000(wired) groups=1000(wired), 0(wheel),
7(bin), 1011(samba), 1024(admin)

which is correct, but through the script I get the following:

# ls -l test
-rwsr-x---  1 root  bin  13 Sep 16 01:34 test

# cat test
#!/bin/sh -
/usr/bin/id

# ./test
uid=1000(wired) gid=1000(wired) groups=1000(wired), 0(wheel), 7(bin),
1011(samba), 1024(admin)

Any help would be much appreciated.

J.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000201bde1a0$82062660$0300000a>