January 06, 2004
FreeBSD help site
FreeBSD Tutorials, Notes, Links & Manual Pagesdel.icio.us | Digg it | Furl | Yahoo MyWeb | Create Social Bookmark Links
Posted by jdarnold at 11:13 AM | TrackBack
Track with co.mments
Track with co.mments Hi all, i wrote this .sh script call freeshell.sh, i create a new user named "newuser"; then i add /etc/shells the line to define my freeshell.sh as a new kind of shell, then assign the defaul shell for 'newuser' to be 'freeshell.sh' ...then i promote 'newuser' to 'wheel', then chmod 700 freeshell.sh ; chown root freeshell.sh ...
I understand the danger in doing this, my code looks okay, and after a lot of testing trying to break up my code, looks okay. so ...then on my code there are lines of code to add a new user account into the box (pw adduser $safelogin ; etc); but my script need root previlages so can add new users without me (root) typing anything.
ok rezon: I offer free shell access to my box to anyone who apply for one, now am trying to automate the creation of new shells because i dont have a lot time adding them manually, my question ...how can i give 'freeshell.sh' root previlages so can add new users to my box automaticly???
2.- how define a quota of x amount of disk space for each new user directly adding that code to my script?
thank! alex
Posted by: alex on February 12, 2004 10:13 PMIt sounds really dangerous to allow anyone to log in and create a new user. It leaves you wide open for abuse, including spammers creating new users just to send out emails.
If you really want to, you might look into setting the "sticky" bit, which, IIRC, means that the person running the script becomes the owner of the script.
And I haven't done much with quotas, so I don't know the answer to your other question.



