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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating new unix users account via tcl..?

Status
Not open for further replies.

ridzz

Programmer
Sep 30, 2001
23
MY
Hello,
I have a problem here. I want to add a new Unix account user by calling adduser via exec. I also want to create a folder for each new user. Is it possible for me to do this from a webpage that I created using tcl (or .adp)?
Hope somebody can help me here. Thanx in advance
 
Please check out the official expect site at nist.
There is a cgi available there, using tcl/expect, that does
what you want.
 
Why not !

try

catch { exec adduser -d dir_name login_name }


-----------


I reckon apache ( using webpage ) user group has the permission to create new user. I have done this b4. If not , you perhaps can give root permission to apache. Which is not safe.... :(
 
I still have a problem with adding new users.. I think it doesn't have root permission to addnew users. You mentioned about giving root permission to apache.. How is that done? and why isn't it safe?
 
Woops!

I guess you just need to modify the file /etc/passwd or shadow file. To make apache to create new user, just give it uid 0. or change the user group to root...

That should work .... ( I am not a system admin but I guess that works )

Again, please consult any senior admin if its safe to do! Sivakumar Kandaraj
web system programmer
Melbourne
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top