I want to get the info of all users and groups who is registerd in the Linux system. How can I realize it through language Python.
for example:in the system there are two groups: groupA and groupB , four users user1, user2, user3, user4, user1 and user2 are in groupA, user3 and user4 are in groupB.
I want: get userList user1,user2,user3,user4 and their group info.
get groupList groupA and groupB.
How can I do? wait for your answer. thanks!