If there is AccountService
running, the file /etc/lightdm/users.conf
is ignored. In such case, you can set minimal UID by changing value of attribute UID_MIN
in file /etc/login.defs
.
Working out what a user can do is hard if you're not that user. You can test various things (is owner, same group, etc) but ACL might apply, there might be no permissions in the mount, who knows. It's hard.
If you can turn into that user, you can test -w <path>
to see if they can write. This isn't as fast as just looking at the inode but it's possible with sudo
.
sudo -u oli test -w <path> && echo "HOORAY"
We can then squirl that onto the back-end of find
. Instead of just using -exec
to change to the oli user over and over and over again (see past revisions), we pipe everything into a xargs instance running as oli. This is much faster.
sudo find / -type d -print0 | sudo -u oli xargs -0 -I{} sh -c 'test -w "$0" && echo "$0"' {}
A somewhat optimised (but visually flabbier) version of this involves minimising the amount of subshelling the xargs performs by piping a stream of paths into a low number of bash subshells. This is undoubtedly faster for big searches.
sudo find / -type d -print0 | sudo -u oli xargs -0 sh -c 'for p; do [ -w "$p" ] && echo "$p"; done' -
Best Answer
You can use
who
command to see where your users have logged in eg. tty, pseudo terminals, etc.you can also use
from your terminal to see what all users are doing