-
- Posts: 164
- Joined: Fri Nov 30, 2018 2:39 pm
- Location: Wales
List of users and their rights
Is there a way I can list all users with all the directories they own or have access too?
Make the most of your family and friends , your children grow up too quickly and you don't notice yourself ageing, friends dissapearing, moving on. You make plans for your future, but they can all be smashed in an instant, live life and enjoy. 

Re: List of users and their rights
doubleudee1 wrote: ↑Thu Sep 12, 2019 11:13 amIs there a way I can list all users with all the directories they own or have access too?
Examination of /etc/passwd will list all users and their Home directories.
(I concede that is not exactly what you asked, but it might help you come close? I have a feeling you would need to do a recursive search on the entire filesystem checking permissions on every element for a really exhaustive solution.)
Re: List of users and their rights
Try this command:
Code: Select all
lslogins -u
-
- Posts: 164
- Joined: Fri Nov 30, 2018 2:39 pm
- Location: Wales
Re: List of users and their rights
Thanks both
Make the most of your family and friends , your children grow up too quickly and you don't notice yourself ageing, friends dissapearing, moving on. You make plans for your future, but they can all be smashed in an instant, live life and enjoy. 

Re: List of users and their rights
Yes, though this may create a lot of data, for directories owned by a given user
Then for a given user (e.g. pi):
repeat for other users.
Code: Select all
awk -F":" '{print $1}' /etc/passwd | sort
Code: Select all
sudo find / -type d -user pi 2>/dev/null