Re: Sticky bit to allow access permission?
- From: ibuprofin@xxxxxxxxxxxxxxxxxxxxxx (Moe Trin)
- Date: Thu, 22 Jun 2006 19:38:44 -0500
On 22 Jun 2006, in the Usenet newsgroup comp.os.linux.setup, in article
<1150982317.699003.264750@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
richardrothwell@xxxxxxxxx wrote:
Hi there, can someone tell me how the sticky bit can be used in a shell
script to allow a normal user to run a root command such as adding a
new user?
1. It's not the sticky bit (which shows up as a 't' or 'T' in the
execute permission for others), but the SUID bit (which shows up as an
's' or 'S' in the execute permission for the owner). See the 'chmod'
man page.
2. The kernel ignores SUID (and SGID) on shell scripts - it's a massive
security problem.
3. Use 'sudo' to run the 'adduser' or 'useradd' command. 'man sudo'
So far im working with a simple script:
echo "I dont like" $1
exec $1
Well, that certainly won't do much. Perhaps you should start with the
Bash-Prog-Intro-HOWTO
-rw-rw-r-- 1 gferg ldp 31540 Jul 27 2000 Bash-Prog-Intro-HOWTO
and then wander over to the Linux Documentation Project at
http://tldp.org/guides.html and grab a copy of The Grendel's fabulous
"Advanced Bash Scripting Guide". From a recent post to comp.os.linux.announce
Announcing the version 3.9 release of the "Advanced Bash Scripting Guide."
This e-book tutorial and reference is the equivalent of a 700-page print book.
With 320 illustrative examples (including such goodies as an anti-spammer
script), the book covers virtually every aspect of scripting.
The web site has the document in a number of file formats. I'd recommend
the HTML tarball
Old guy
.
- References:
- Sticky bit to allow access permission?
- From: richardrothwell@xxxxxxxxx
- Sticky bit to allow access permission?
- Prev by Date: Re: Fedora / FreeBSD files question
- Next by Date: Re: need help with dependencies for apt-get
- Previous by thread: Re: Sticky bit to allow access permission?
- Next by thread: need help with dependencies for apt-get
- Index(es):
Relevant Pages
|