LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-14-2015, 07:18 AM   #1
jaydul
Member
 
Registered: Sep 2012
Posts: 51

Rep: Reputation: Disabled
useradd command Why 1000:1000: Group?


useradd -s /bin/bash -d /home/jaydul -m jaydul
[root@tuhin /]# cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
operator:x:11:0perator:/root:/sbin/nologin
games:x:12:100:games:/usr/games:/sbin/nologin
ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
nobody:x:99:99:Nobody:/:/sbin/nologin
dbus:x:81:81:System message bus:/:/sbin/nologin
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
jaydul:x:1000:1000::/home/jaydul:/bin/bash
[root@tuhin /]# cat /etc/redhat-release
CentOS Linux release 7.0.1406 (Core)

jaydul:x:1000:1000::/home/jaydul:/bin/bash

Why 1000:1000: Group? it will be by default will be 500:500?
I was any mistake?
jaydul:x:500:500::/home/jaydul:/bin/bash
 
Old 03-14-2015, 07:45 AM   #2
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Because of chosen popular convention. System groups and users assigned below 1000. In some below 100.
 
Old 03-14-2015, 09:49 AM   #3
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Stretch/Sid, Linux Mint DE
Posts: 4,604

Rep: Reputation: 686Reputation: 686Reputation: 686Reputation: 686Reputation: 686Reputation: 686
Small addition. It is a system setting which can be changed. Some distros ship with 500 as the first normal user, other distros ship with 1000. There is nothing magic, it is just that normal accounts start with a certain number and anything below is reserved for system use.

jlinkels
 
Old 03-14-2015, 12:40 PM   #4
jaydul
Member
 
Registered: Sep 2012
Posts: 51

Original Poster
Rep: Reputation: Disabled
so I created account properly with this command?
"useradd -s /bin/bash -d /home/jaydul -m jaydul"
 
Old 03-14-2015, 12:53 PM   #5
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,795

Rep: Reputation: 749Reputation: 749Reputation: 749Reputation: 749Reputation: 749Reputation: 749Reputation: 749
If you don't like the defaults you can set uid with -u and gid with -g.
 
Old 03-14-2015, 02:10 PM   #6
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Yes, by default it should start from 500 but it depends on how the login definitions set on the system. Check your /etc/login.defs quite possible that UID_MIN is set to 1000
 
1 members found this post helpful.
Old 03-14-2015, 02:15 PM   #7
jaydul
Member
 
Registered: Sep 2012
Posts: 51

Original Poster
Rep: Reputation: Disabled
UID_MIN 1000
UID_MAX 60000
# System accounts
SYS_UID_MIN 201
SYS_UID_MAX 999
 
Old 03-14-2015, 02:24 PM   #8
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
There you go!! You got the answer why it is starting from 1000.
 
Old 03-14-2015, 05:14 PM   #9
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,704

Rep: Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270
It also helps to check the /etc/passwd file for what is used by default. There can be a number of system accounts defined, but not yet used (or not until you install the additional software).

Some things have changed- for instance, nobody (used to be 65534) is now 99:99.
Systemd uses a bunch:
systemd-timesync:999:998
systemd-network:x:998:997
systemd-resolve:x:997:996
systemd-bus-proxy:x:996:995

And then there is:

cockpit-ws:x:994:992
polkitd:x:995:994
geoclue:x:993:990
unbound:x:992:987
lightdm:x:991:986
openvpn:x:990:985
colord:x:989:984
chrony:x:988:981
nm-openconnect:x:987:980
sddm:x:986:979
saslauth:x:985:76
backuppc:x:984:977
ntop:x:983:974
gnome-initial-setup:x:982:973
dockerroot:x:979:968
munge:x:978:967

This is a fedora 20 server configuration (though I have added workstation software as well), and the number used will depend on the distribution you use. These are just examples of those > 500.

One place I used to work set the users minimum to 1000, and maximum to 10,000 (no real reason other than a nice round number), and kept 100-500 for administrators, 500-999 for user support staff. Here we picked 100 because no system was using anything internally higher than 52 (excluding nobody),

Individual sites may have different policies, but the tendency had been going higher for quite a while.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] id: cannot find name for group ID 1000 / user ID 1000 McZ Linux From Scratch 1 01-14-2013 11:46 PM
[SOLVED] Nic -> 1000 MB ? jv2112 Linux - Hardware 1 08-28-2010 05:00 AM
How to configure 1000 Base T ethernet card to send at 1000 Base T? trist007 Linux - Newbie 12 09-23-2009 12:59 AM
HP 1000 Problem oysterman Mandriva 4 12-01-2007 09:54 PM
1000 Posts Mathieu General 7 09-13-2003 04:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration