Well, I need to add users from a web interface for a web server, which runs only Python. I need to add users, set quotas and in future even look at managing ip tables to limit bandwidth.
I know os.system(), but this has to be done through a form entry through a web interface. Anyways thanks, do advise if there more pythonic solutions Ramdas Hari Sekhon wrote: > That is shell scripting with a python layer on top. Is there a > specific reason you have to use python? Why not just use shell, that's > what it's designed for? Unless you have some complex maths/networking > requirement or something on top. > > -h > > On 01/01/07, Daniel Klein <[EMAIL PROTECTED]> wrote: > > On 1 Jan 2007 11:33:42 -0800, "Ramdas" <[EMAIL PROTECTED]> wrote: > > > > >How do I add users using Python scripts on a Linux machine? > > > > > >Someone has a script? > > > > This should be as easy as something like: > > > > os.system("/usr/sbin/useradd -m -d /home/newuser -s /bin/ksh") > > > > Dan > > -- > > http://mail.python.org/mailman/listinfo/python-list > > > > > -- > Hari Sekhon -- http://mail.python.org/mailman/listinfo/python-list