Linux reverse check the user name according to uid
Others
2022-04-28 10:51:32
views: 0
The auditd log only records the user uid and does not display the corresponding user name, which does not seem very friendly, so it is necessary to check the user name according to the uid, but some users are on ldap, so they cannot be checked through /etc/passwd. , consulted the full stack engineer root, and gave a command
getent passwd uid
Check it out and sure enough, record it here, such as querying the user name with uid 33,
execute
getent passwd 33
The following results are returned:
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
http://blog.csdn.net/hrayha/article/details/53612510
linux View current logged in users uid,gid
http://www.jb51.net/LINUXjishu/57933.html
Origin http://43.154.161.224:23101/article/api/json?id=326271656&siteId=291194637