How to find out the highest UID number?
i am using linuxcentos system .my question is how to find out the highest UID number of the system using terminal please help me urgently
|
Welcome to LQ.
Your question leaves us with 2 possible replies.. The highest UID allowed, or the highest UID assigned? Please refer to https://en.wikipedia.org/wiki/User_identifier and reply. NOTE: We're volunteers here, "urgently" doesn't work. |
UUID is assigned automatically once you connect with wireles network. Each network has its own way of doing it. Ask network root.
|
i think /etc/passwd contains uid:gid (you can probably awk | sort | tail that file).
|
Quote:
|
Well,.. thinking off the top of my head here
Code:
cut -f 3 -d: /etc/passwd | sort -n | tail -n 1 |
You might not be able to do it at all.
If the passwords are obtained from a conventional /etc/passwd file, then you can potentially scan that file to locate the highest number. But, on a typical corporate system, that file is not maintained, and it is not the source of user-ID information at all. Instead, a central directory-management authority (e.g. LDAP) is used to maintain this information. |
Quote:
You can find something like this in the file /etc/login.defs, where its defined the max UID that will be assigned to user. You can change the value also. PHP Code:
|
All times are GMT -5. The time now is 10:23 PM. |