2
0
New user is not taking system default Group ID. System default group id for new user is 100. Whenever i create a new user, GID as well as UID increments by 1. I can understand UID but GID should be 100 for every new user. What is the possible reason? I am using Amazon linux AMI on EC2.
# adduser -D
GROUP=100
HOME=/home
INACTIVE=-1
EXPIRE=
SHELL=/bin/bash
SKEL=/etc/skel
CREATE_MAIL_SPOOL=yes
# useradd -m testuser
# useradd -m testuser2
# cat /etc/passwd
testuser:x:501:503::/home/testuser:/bin/bash
testuser2:x:502:504::/home/testuser2:/bin/bash
1I'm not sure about AMI, but on some OSes, adduser is actually a separate Perl wrapper script for useradd. Try using
adduser
instead when actually adding the user to see if that has any effect. – Garrett – 2011-12-17T07:19:42.797i tried adduser also, but unfortunately same result. – P K – 2011-12-17T07:25:32.567
If your system's
adduser
is a Perl script and not a symlink touseradd
, check/etc/adduser.conf
and ensure thatFIRST_GID
is set appropriately. AMI may useGROUP
as an alias of that, but the Ubuntu box I'm looking at now has no such definition. – Garrett – 2011-12-17T07:40:46.467i don't see any .conf file related to adduser in /etc – P K – 2011-12-17T07:51:03.730