Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

set UID bit

Status
Not open for further replies.

JohnMaas

MIS
Aug 14, 1999
18
US
Hi,<br><br>I set the uid bit of a shell script (chmod u+s script.sh)<br>and made root is the owner of the script. <br>In this script I create a new user and start the passwd session to set his password.<br><br>The passwd routine however asks for the current user passwd, so it seems that it's not root running this command.<br><br>Did I mis interpret the setUID scope somehwere ??&nbsp;&nbsp;
 
Hi John,<br><br>This is disabled for shell scripts under AiX (somewhat annoyingly).<br><br>Get 'round it like this:<br><br>Write your shell script, make sure it's only readable, writable, executable by root.<br><br>Write a &quot;wrapper&quot; program in C that just does an 'execve' of your shell script. Call the shell script using an absolute path.<br><br>Make sure the wrapper executable is only readable, writable, executable by root. <br><br>Make the wrapper executable suid.<br><br> <p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.com</a><br><a href= Cargill's Corporate Web Site</a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top