You can't create a new user without having root-permissions.
You have to be root (or use sudo), then you can use the adduser command. | [reply] |
| [reply] |
Dear Friends, I need a Help. how can i create a new user in linux from a already exist user account ( not ROOT user ). ie. using setuid() function i have to activate the user as root user tempararyly and create one user. and also change the file permission ( to write ) which is also created by root user.
Foggy question, IMHO. And -as stated- deserving an answer along the lines of "you can't". Also, still IMHO, if you have to ask you don't want to mess w/ this kinda stuff, believe me.
its urgent please help me.
Generally this doesn't buy you anything. Good of you not to have put that into the Subject.
| [reply] |
If you really think you want to create an easy-to-use perl script that allows anyone with a user account on a linux box to create a new user account on that box, then either you yourself are a cracker, or else you are (knowingly or not) a cracker's "best friend", i.e. a person who disables a basic and essential security feature.
What you're suggesting is sort of like leaving the key in the lock when you walk away from your house or car. Having an "urgent" need to do so is ridiculous. | [reply] |
In generally, in Unix you cannot add users without being root, although some Unices have suid programs that allow non-root users to add users. IIRC, Solaris allows anyone in the admin group to add users using admintool. But still, those tools work by temporarely giving someone root powers - and only root can grant those powers. | [reply] |