geekvenue.net

Welcome to Chucktips Hardware HELP WITH DEAD OS Installing FreeBSD Miscellaneous
 faq
 search
 add article
 cool-stuff
 how-to
 main
 tips


HOWTO:give an script (.sh) root privilages (adduser, addgroup)
Users and Groups Posted by alex on Friday February 13, @06:40PM
from the free-shell-server-on-freebsd-with-lazy-admin dept.
If you got one of those "free shell sever" and used to do every thing manually, like adding new users from root account ...but then some how the request for new account its to much to handle, so you give some body or in this case a custom .sh scrript the power of adding new acounts, so this is what i did so far ...
first add new account "newuser" create new group "autoshell" program a custom .sh (shell) file ...i call my 'freeshell.sh' edit '/etc/shells' add 'freeshell.sh' as new kind of shell. # chown root freeshell.sh # chmod 700 freeshell.sh then assign 'freeshell' as default shell for 'newuser' add 'newuser' to 'wheel' group i program my script as secure as possible ...i test it and looks okay, i alse understand the dangers that this will give to the security of my sistem, all this right now its practicly unsecure as been now, more mesurements will come along when this script its working fine. so know my questions ...my script can not add new users to my sistem ...said "you are not root!" and errors like that. how give my script and my 'newuser' root previlages so can ad new users automaticly to the system? also if you wnat to give quota, how can you implement that on the .sh script?? please replay via email if posible, thanks all

<  |  >

 

Related Links
  • Articles on Users and Groups
  • Also by alex
  • Contact author

    Lilliput Mini USB Computer Monitor

    If you have ever wanted to learn about Cisco Routers, check out my new book "Cisco Routers for the Small Business" - it's Cisco CLI for the Regular Guy!

  • Sponsors

    The Fine Print: The following comments are owned by whoever posted them.
    ( Add a Reply )

    Re: HOWTO:give an script (.sh) root privilages (adduser, addgroup)
    by Understudy on Thursday February 19, @03:09PM
    You will need to have the script run sudo. At least that is what it sounds like to me. Read man sudo or view it here:
    http://www.courtesan.com/sudo/man/sudo.html
    [ Add a Reply to this ]
    The Fine Print: The following comments are owned by whoever posted them.
    ( Article Reply )

    "You never know how many friends you have until you own a Condo on the beach." -- Jason's Postulate

    Powered by Zope  Powered by Apache  Squishdot Powered
    All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest ©2001 Jason Neumann.
    [ main | post article | search ]