Does anyone know how do I list existing alias for a certain Unix/Linux user on Debian? For example I have an Unix/Linux user 1001 and want to know which alias for login it has?
If it's a local user you can grep
/etc/passwd for it. Like following:
grep 1001 /etc/passwd
If it's a non-local user, it depends on the DB backend that is used to store him in. For example if you use NIS you may check with
cd /etc ypcat passwd | grep 1001
For other DB backends you'll have to check the specific ways to search for a user by UID.