How do I add users using Python scripts on a Linux machine

Daniel Klein danielkleinad at gmail.com
Tue Jan 2 00:25:26 CET 2007


On 1 Jan 2007 11:33:42 -0800, "Ramdas" <ramdaz at gmail.com> 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



More information about the Python-list mailing list