Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
List of all Debian system users and their UIDs
List of all Debian system users and their UIDs
Is there a master list of all Debian system users and their UIDs? I want to create a new system user for a script, but before I do I want to see if there is an appropriate one I can reuse. I want to avoid reusing a UID that is used by another system user for software I don't have installed yet.
- GarryRicketson
- Posts: 5644
- Joined: 2015-01-20 22:16
- Location: Durango, Mexico
Re: List of all Debian system users and their UIDs
Yes there is, it is in /etc/passwdIs there a master list of all Debian system users and their UIDs?
I used these keywords:
Code: Select all
How to get List of all Debian system users and their UIDs
Since I do understand, in fact just the other day, my favourite search engine was literally broken, for real, I know that can happen, any way the first hit:
Shows various methods, but since you say:
Probably this is most relevent:I want to avoid reusing a UID that is used by another system user for software I don't have installed yet.
Now I know, you will say, "But I said system users", yes I noticed that, but if you actually can read, and look at the page the link goes to, there is much more, including:From:https://linuxize.com/post/how-to-list-users-in-linux/Check whether a user exists in the Linux system
/etc/passwd
Now that we know how to list all users, to check whether a user exists in our Linux box we can simply filter the users’ list by piping the list to the grep command.
For example to find out if a user with name jack exists in our Linux system we can use the following command:Code: Select all
getent passwd | grep jack
It then goes on to show some commands that can be used for "system users" as well,...if that is not enough, try the key words your self, and try reading some of the other results, or maybe sometime someone else will have better answer then this one.System and Normal Users
There is no real technical difference between the system and regular (normal) users. Typically system users are created when installing the OS and new packages. In some cases, you can create a system user that will be used by some application.
Normal users are the users created by the root or another user with sudo privileges. Usually, a normal user has a real login shell and a home directory.----snip------
This one is pretty thorough, detailed:
https://www.cyberciti.biz/faq/linux-list-users-command/
"What we expect you have already Done"
==========
Old Website
======================
For the Birds
==================
What Does a Parrot Know About PTSD?
==========
Old Website
======================
For the Birds
==================
What Does a Parrot Know About PTSD?
Re: List of all Debian system users and their UIDs
I meant all system users for all Debian packages, including packages I have perhaps not yet installed. When a Debian maintainer wants to add a new system user, that maintainer must be able to check a list of all UIDs assigned so that the newly assigned user doesn't conflict. I want to know where that list is maintained.
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 133 times
Re: List of all Debian system users and their UIDs
UIDs are part of the Linux Standard Base:
EDIT: I meant to post this in your other thread (which is about exactly the same thing).
https://refspecs.linuxfoundation.org/LS ... range.htmlLSB wrote:23.3 User ID Ranges
The system User IDs from 0 to 99 should be statically allocated by the system, and shall not be created by applications.
The system User IDs from 100 to 499 should be reserved for dynamic allocation by system administrators and post install scripts using useradd.
EDIT: I meant to post this in your other thread (which is about exactly the same thing).
deadbang
-
- Posts: 3
- Joined: 2019-11-09 13:29
Re: List of all Debian system users and their UIDs
There are multiple ways of knowing where the user ids may be stored on Linux.VA1DER wrote:I meant all system users for all Debian packages, including packages I have perhaps not yet installed. When a Debian maintainer wants to add a new system user, that maintainer must be able to check a list of all UIDs assigned so that the newly assigned user doesn't conflict. I want to know where that list is maintained.
You can indeed check the /etc/password file but there are some files on the filesystem that are also containing entries related to the Name Service Switch (nsswitch.conf)
This is where you might find information about where user ids are stored, sometimes there are stored in NIS for example.