Don't want to use useradd command to create a new user
I am doing manual addition of accounts. Actually I am writing a script and I am working on RedHat7.1 system. What I am trying to do is run the script and pass all the values of the username password and group as command line parameters. Now... (2 Replies)
Can any one tell me if i dun want using 'useradd' command to add new user, it is have any command i can use to add a new user?and any extra step needed for my local environment? (3 Replies)
Hi
Reqmt: I am working on Sys 1 and passes a command to Sys2 using a utility which has ssh coded in it. Is there any way to get the process id of the command in Sys 2 from my Sys1 ? Note: The utility is not editable, so you cannot get it through it and I am not logged in in Sys2.
Thanks... (2 Replies)
This is one our office BOX
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
Kisses% rlogin pebblz01 -l adminID
Password:
Last login: Sat Feb 14 01:11:36 from Kisses
Please enter your own login id and password.
Your login: I_rule
Your password:xxxxx
From the above... (3 Replies)
Hi there,
One can easily retrieve the uid from a username :
id -u $username
But how can we easily retrieve the gid from a group name?
I mean is there a command without using sed?
sed -nr "s/^$groupname:x:(+):.*/\1/p" /etc/group
Thanks for your help
Santiago (7 Replies)
We had a mapping to one UNIX box just fine, the server was changed to another UNIX box and now when mapping drives from Windows box to new UNIX box, we get the old GID associated with our Windows user. When checking on new UNIX box, we see GID of 108, which is what we want, but when we map the... (0 Replies)
I´m listing the contents of a directory using the command
ls -lI get numeric uid and gid for some lines.
example:
drwxr-xr-x root root 1970-01-01 01:00 sys
-rw-r--r-- 501 20 0 2010-08-04 14:54 shutdown.bravo.rc
drwxr-x--- 501 20 ... (5 Replies)
Hi,
I want to create multiple user in same home directory.
Is it possible ?
If possible then please tell me how.
Thanks in advance. (3 Replies)
Discussion started by: mnmonu
3 Replies
LEARN ABOUT LINUX
groupmod
GROUPMOD(8) System Management Commands GROUPMOD(8)NAME
groupmod - modify a group definition on the system
SYNOPSIS
groupmod [options] GROUP
DESCRIPTION
The groupmod command modifies the definition of the specified GROUP by modifying the appropriate entry in the group database.
OPTIONS
The options which apply to the groupmod command are:
-g, --gid GID
The group ID of the given GROUP will be changed to GID.
The value of GID must be a non-negative decimal integer. This value must be unique, unless the -o option is used. Values between 0 and
999 are typically reserved for system groups.
Any files that have the old group ID and must continue to belong to GROUP, must have their group ID changed manually.
-h, --help
Display help message and exit.
-n, --new-name NEW_GROUP
The name of the group will be changed from GROUP to NEW_GROUP name.
-o, --non-unique
When used with the -g option, allow to change the group GID to a non-unique value.
-p, --password PASSWORD
The encrypted password, as returned by crypt(3).
Note: This option is not recommended because the password (or encrypted password) will be visible by users listing the processes.
You should make sure the password respects the system's password policy.
CONFIGURATION
The following configuration variables in /etc/login.defs change the behavior of this tool:
MAX_MEMBERS_PER_GROUP (number)
Maximum members per group entry. When the maximum is reached, a new group entry (line) is started in /etc/group (with the same name,
same password, and same GID).
The default value is 0, meaning that there are no limits in the number of members in a group.
This feature (split group) permits to limit the length of lines in the group file. This is useful to make sure that lines for NIS
groups are not larger than 1024 characters.
If you need to enforce such limit, you can use 25.
Note: split groups may not be supported by all tools (even in the Shadow toolsuite). You should not use this variable unless you really
need it.
FILES
/etc/group
Group account information.
/etc/gshadow
Secure group account information.
EXIT VALUES
The groupmod command exits with the following values:
0
success
2
invalid command syntax
3
invalid argument to option
4
specified group doesn't exist
6
specified group doesn't exist
9
group name already in use
10
can't update group file
SEE ALSO chfn(1), chsh(1), passwd(1), gpasswd(8), groupadd(8), groupdel(8), useradd(8), userdel(8), usermod(8).
System Management Commands 06/24/2011 GROUPMOD(8)