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 character (:) and parsing the resulting
list.

It seems you will also need some form of UI, simple print and
raw_input may do the trick.

On 9/4/07, chinni <[EMAIL PROTECTED]> 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 and user
> has to give the mode and owner name and group name from the list.
>
> Can i implement this in python or in shell scripting
> Can any one please suggest me from doing this...:)
>
> --
> Best Regards,
> M.Srikanth Kumar,
>
>
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>
>
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to