Re: [Tutor] Plz help me from this

2007-09-05 Thread Carlos Daniel Ruvalcaba Valenzuela
Yes is very possible to do this with python. Checkout the os.system and os.popen functions to run external commands (chmod, chown). Reading the list of users and groups should be easy, just open the file and read line by line and parse, you can do it as simple as splitting the line on colon

Re: [Tutor] Plz help me from this

2007-09-05 Thread Steve Willoughby
chinni wrote: Hi All, I Want to write a python script to change the permissions(chmod) and owner(chown) and group(chgrp) of a file on unix, script as to read from the /etc/passwd for displaying available users on the machine and from /etc/groups it as to display the available groups

Re: [Tutor] Plz help me from this

2007-09-05 Thread Steve Willoughby
Carlos Daniel Ruvalcaba Valenzuela wrote: Yes is very possible to do this with python. Checkout the os.system and os.popen functions to run external commands (chmod, chown). While those are ways of calling external commands, it is best to use built-in language features like os.chmod() and

[Tutor] Plz help me from this

2007-09-04 Thread chinni
Hi All, I Want to write a python script to change the permissions(chmod) and owner(chown) and group(chgrp) of a file on unix, script as to read from the /etc/passwd for displaying available users on the machine and from /etc/groups it as to display the available groups and user has to give the