setuid does nothing on a script. If you think about it this makes sense. The interpreter would have to be setuid because it is not, in fact, the script that is executed, but the interpreter.

Pepe Torralba wrote:


Hi!

I'm trying to make a script that create new users, using useradd.
This script would be owned by root but it will be used just by a normal user.
I set:


chmod ug+s myscript

-rwsr-sr-x root sys myscript

but when this user runs the script it recieve the following answer:

error: useradd failed
you are not authorized to administer users and groups

Shoul i set chmod ug+s for useradd, passwd and users too?

Please need help

Thanks for your attention

Jose Torralba



_________________________________________________________________
Charla con tus amigos en l�nea mediante MSN Messenger: http://messenger.yupimsn.com/



____________________
BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________
List Info: http://phantom.byu.edu/cgi-bin/mailman/listinfo/uug-list



____________________ BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________ List Info: http://phantom.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to