how to add linux user to group?
Answers were Sorted based on User's Feedback
Answer / vishal
Command is useradd UserName
Option -g ( For Primary Group)
-G ( For Seconday Group)
| Is This Answer Correct ? | 25 Yes | 1 No |
Answer / anoop
useradd -g group_name user_name (for primary group)
useradd -G group_name user_name (For secondard group)
| Is This Answer Correct ? | 22 Yes | 4 No |
Answer / d.veera
gpasswd -g username groupname
or
usermod -G groupname username
| Is This Answer Correct ? | 16 Yes | 3 No |
Answer / amit kumar ghosh
There are 2 types group in linux system.
1.primary
2.secondary
to add user to primary.
# useradd -g groupname username
to add user to secondary.
#useradd -G groupname username.
| Is This Answer Correct ? | 4 Yes | 1 No |
Answer / ganesan
# usermod -g groupname username(for Primary Group)
# usermod -G groupname username(for Secondary Group)
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / sudhakar.g
In /etc/group add the linux user( The user must be existin
linux box)
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / ajay songare
New User Add to Grop
# username -g groupname username(for Primary Group)
# useradd -G groupname username(for Secondary Group)
Old User Add To Grop
# usermod -g groupname username(for Primary Group)
# usermod -G groupname username(for Secondary Group)
| Is This Answer Correct ? | 1 Yes | 0 No |
what is a command to display top 10 users who are using Huge Space?
How can you copy lines into the buffer in command mode?
difference between nfs soft and hard mouniting points?
what are the features of Linux?
What does mkdir mean?
What is cpu core in linux?
What is finger in networking?
difference between Tcp and udp
what is soft mount and hard mount? i have to make permanent nfs mount permanent what shall i do?
how to view crond status? If it's show service is not found.
Explain about the command elm?
What is grep command?