Date: Thu, 17 Sep 1998 13:45:30 -0700 (PDT) From: Doug White <dwhite@resnet.uoregon.edu> To: Jordan Krushen <jkrushen@home.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Setuid shell script problem Message-ID: <Pine.BSF.4.03.9809171344410.2759-100000@resnet.uoregon.edu> In-Reply-To: <000201bde1a0$82062660$0300000a@oblivion.purplemedia.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 16 Sep 1998, Jordan Krushen wrote: > 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: suid shell scripts are a *bad* idea. In addition the system ignores the suid bit if you try to run scripts directly. Use the command sh . ./test instead. > 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) > Doug White Internet: dwhite@resnet.uoregon.edu | FreeBSD: The Power to Serve http://gladstone.uoregon.edu/~dwhite | www.freebsd.org 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?Pine.BSF.4.03.9809171344410.2759-100000>