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
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
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
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