In this post we will know,how to create a system account below uid 500 on Red Hat based operating system.In Red Hat based operating system,the system account are below UID 500.
The UID below 500 are reserved for system use ,it should not be assigned to other users.
We can easily check the system user account and UID information in /etc/passwd file.
In below given screenshot,here squid is the system user.When we install squid proxy , by default squid user get created. And the squid user will get the UID below 500
When a developer create any software and require system user,the uid should be below 500.In some cases,some software require manual addition of system account in system.
The below given command will create the system account and randomly provide the UID below 500 to newly created system user.
We will use option
-r with useradd command
useradd -r User-name
for example, I will create a user called sharad and system will assign the UID automatically to user below 500.
[root@localhost ~]# useradd -r sharad [root@localhost ~]# [root@localhost ~]# id sharad uid=497(sharad) gid=496(sharad) groups=496(sharad) [root@localhost ~]#
Note: With the help of
id command,you can get information like UID,GID and groups in which user is member.