<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Jul 17, 2012, at 9:58 PM, Maria Hanna Carmela Dionisio wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; position: static; z-index: auto; "><div>Im just a student :)</div><div><br></div><div>Our prof gave as a task that we need to make a program using python (for redhat) and c++(for windows)</div><div><br></div><div>Our objective is to make a program file and we will said it remotely to another computer via network ( its easy and i could do it lolz)..</div><div><br></div><div>the hard part is the programming..that when the user click the file a box will prompt and ask for username and a password(even without a password) then the username that he inputted will add to the user account of his/her computer :DD</div><div><br></div><div>HELP HELP EXPERTSSSSSSSSSSSSSS</div><div><br></div><div>THANKS :D<br></div></div></div>-- <br><a href="http://mail.python.org/mailman/listinfo/python-list">http://mail.python.org/mailman/listinfo/python-list</a><br></blockquote></div><br><div>I'm sorry if I'm not understanding exactly what your professor wants, I think he is asking you to add a new user to the list of possible users of the computer - that is, add a new user account.  If so, then the answer is pretty simple, since Linux (Red Hat) has a "useradd" command that you just have to supply inputs to.  Your python program will start by importing "subprocess" and then using it to spawn a child process in which the useradd command will run.</div><div><br></div><div>Read the subprocess documentation here:</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span><a href="http://docs.python.org/library/subprocess.html?highlight=subprocess#subprocess">http://docs.python.org/library/subprocess.html?highlight=subprocess#subprocess</a></div><div><br></div><div>and see if this, plus the man page for useradd, doesn't get you going.</div><div><br></div><div>-Bill</div></body></html>