Sponsored Content
Operating Systems Solaris Add existing user into an existing group Post 302294782 by a2156z on Thursday 5th of March 2009 09:42:22 PM
Old 03-05-2009
Add existing user into an existing group

Pre: no gpasswd/adduser

there is just usermod can be used, also there is no -a option for usermod.

How should I add a user into a group?
a2156z
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Assigning existing users to a secondary group

Hi!!, I am on HP UX -11. I have created a new group and want to assign some the users to this group without changing their existing group ( The new group is the secondary group for them) Any ideas how to do it?? SAM doesnt seem to be working.. Any way of doing it from command line?? ... (1 Reply)
Discussion started by: jyotipg
1 Replies

2. UNIX for Dummies Questions & Answers

usermod -G and Group id login replacing existing groups

Hi all usermod -G Group_id login it is replacing the existiong Secoundry groups and is adding the only group speced in usermod command how can we retain the existing secoundry groups and add a user to a new group (6 Replies)
Discussion started by: pbsrinivas
6 Replies

3. Shell Programming and Scripting

folder existing and file existing

I want to look into a folder to see if there are any folders within it. If there are, I need to check inside each folder to see if it contains a .pdf file So If /myserver/myfolder/ contains a folder AND that folder conatins a .pdf file do X Else do Z I may have multiple folders and... (4 Replies)
Discussion started by: crowman
4 Replies

4. Shell Programming and Scripting

insert pipes for existing and non-existing records

I have a source file like this, L4058S462 34329094 F51010141TK1070000483L4058S462 34329094 0232384840 381892 182 5690 L4058S462 34329094 F51020141FIRST CLEARING, LLC A/C 3432-9094 L4058S462 34329094 F51030141JOHAN HOLMQVIST ... (1 Reply)
Discussion started by: saravanamr
1 Replies

5. Shell Programming and Scripting

Giving existing user access on ftp

Hi all, I have a project on going that combines two different departments. I cannot give detais on this project, I´m sure everybody understands that, but I would like your help on giving me pointers on how to give an existing user access to ftp, without the need to give him full access. So here... (0 Replies)
Discussion started by: Alexis Duarte
0 Replies

6. UNIX for Dummies Questions & Answers

Setting up existing Directories using facls to recursively add an individual user

I've been working with Solaris/Linux for about 4 months now. Let me explain the scenario. There will be two users involved. The owner (curOwner) and the new user (newUser). The server in question is a Solaris 10 box. So curOwner runs an application that is constantly writing logs to lets say.... (2 Replies)
Discussion started by: amadont12
2 Replies

7. UNIX for Dummies Questions & Answers

create new group/delete existing group

Hi, please let me know the commands to create new group/delete existing group in unix and assigning users to newly created group. Thank you in advance. (2 Replies)
Discussion started by: kancherla.sree
2 Replies

8. UNIX for Dummies Questions & Answers

Appending lines from an existing list to each line in another existing list

Evening all ! I would like to ask your expertise on how to accomplish the following ; I have 2 lists, and would like each line from list2 to be appended to each line in list1, resulting in list3 ; List1; alpha beta charlie List2; one two three (4 Replies)
Discussion started by: TAPE
4 Replies

9. AIX

Adding existing VG to powerHA Resource group

Hello. I am Running AIX 6.1 and PowerHA 6.1 I have an active/active cluster (Prod/Dev) cluster. Each side will failover to the other. I have on my prod side an active volume group with a file system. The VG is imported on both nodes and active (varried on, file system mounted) on the prod... (3 Replies)
Discussion started by: mhenryj
3 Replies

10. HP-UX

Create a new user from using existing users profile

Hello, Just wanting to know if it is possible. Also I am new to command line. I am running 5.1b, if that matters. Thanks in advance (10 Replies)
Discussion started by: bcha
10 Replies
ADDUSER(8)                                                    System Manager's Manual                                                   ADDUSER(8)

NAME
adduser, addgroup - add a user or group to the system SYNOPSIS
adduser [options] [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID] [--firstuid ID] [--lastuid ID] [--ingroup GROUP | --gid ID] [--disabled-password] [--disabled-login] [--gecos GECOS] [--add_extra_groups] [--encrypt-home] user adduser --system [options] [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID] [--group | --ingroup GROUP | --gid ID] [--disabled- password] [--disabled-login] [--gecos GECOS] user addgroup [options] [--gid ID] group addgroup --system [options] [--gid ID] group adduser [options] user group COMMON OPTIONS [--quiet] [--debug] [--force-badname] [--help|-h] [--version] [--conf FILE] DESCRIPTION
adduser and addgroup add users and groups to the system according to command line options and configuration information in /etc/adduser.conf. They are friendlier front ends to the low level tools like useradd, groupadd and usermod programs, by default choosing Debian policy conformant UID and GID values, creating a home directory with skeletal configuration, running a custom script, and other fea- tures. adduser and addgroup can be run in one of five modes: Add a normal user If called with one non-option argument and without the --system or --group options, adduser will add a normal user. adduser will choose the first available UID from the range specified for normal users in the configuration file. The UID can be overridden with the --uid option. The range specified in the configuration file may be overridden with the --firstuid and --lastuid options. By default, each user in Debian GNU/Linux is given a corresponding group with the same name. Usergroups allow group writable directories to be easily maintained by placing the appropriate users in the new group, setting the set-group-ID bit in the directory, and ensuring that all users use a umask of 002. If this option is turned off by setting USERGROUPS to no, all users' GIDs are set to USERS_GID. Users' pri- mary groups can also be overridden from the command line with the --gid or --ingroup options to set the group by id or name, respectively. Also, users can be added to one or more groups defined in adduser.conf either by setting ADD_EXTRA_GROUPS to 1 in adduser.conf, or by pass- ing --add_extra_groups on the commandline. adduser will create a home directory subject to DHOME, GROUPHOMES, and LETTERHOMES. The home directory can be overridden from the command line with the --home option, and the shell with the --shell option. The home directory's set-group-ID bit is set if USERGROUPS is yes so that any files created in the user's home directory will have the correct group. adduser will copy files from SKEL into the home directory and prompt for finger (gecos) information and a password. The gecos may also be set with the --gecos option. With the --disabled-login option, the account will be created but will be disabled until a password is set. The --disabled-password option will not set a password, but login is still possible (for example with SSH RSA keys). To set up an encrypted home directory for the new user, add the --encrypt-home option. For more information, refer to the -b option of ecryptfs-setup- private(1). If the file /usr/local/sbin/adduser.local exists, it will be executed after the user account has been set up in order to do any local set- up. The arguments passed to adduser.local are: username uid gid home-directory The environment variable VERBOSE is set according to the following rule: 0 if --quiet is specified 1 if neither --quiet nor --debug is specified 2 if --debug is specified (The same applies to the variable DEBUG, but DEBUG is deprecated and will be removed in a later version of adduser.) Add a system user If called with one non-option argument and the --system option, adduser will add a system user. If a user with the same name already exists in the system uid range (or, if the uid is specified, if a user with that uid already exists), adduser will exit with a warning. This warn- ing can be suppressed by adding --quiet. adduser will choose the first available UID from the range specified for system users in the configuration file (FIRST_SYSTEM_UID and LAST_SYSTEM_UID). If you want to have a specific UID, you can specify it using the --uid option. By default, system users are placed in the nogroup group. To place the new system user in an already existing group, use the --gid or --ingroup options. To place the new system user in a new group with the same ID, use the --group option. A home directory is created by the same rules as for normal users. The new system user will have the shell /usr/sbin/nologin (unless over- ridden with the --shell option), and have logins disabled. Skeletal configuration files are not copied. Add a user group If adduser is called with the --group option and without the --system option, or addgroup is called respectively, a user group will be added. A GID will be chosen from the range specified for system GIDS in the configuration file (FIRST_GID, LAST_GID). To override that mechanism you can give the GID using the --gid option. The group is created with no users. Add a system group If addgroup is called with the --system option, a system group will be added. A GID will be chosen from the range specified for system GIDS in the configuration file (FIRST_SYSTEM_GID, LAST_SYSTEM_GID). To override that mechanism you can give the GID using the --gid option. The group is created with no users. Add an existing user to an existing group If called with two non-option arguments, adduser will add an existing user to an existing group. OPTIONS
--conf FILE Use FILE instead of /etc/adduser.conf. --disabled-login Do not run passwd to set the password. The user won't be able to use her account until the password is set. --disabled-password Like --disabled-login, but logins are still possible (for example using SSH RSA keys) but not using password authentication. --force-badname By default, user and group names are checked against the configurable regular expression NAME_REGEX (or NAME_REGEX_SYSTEM if --sys- tem is specified) specified in the configuration file. This option forces adduser and addgroup to apply only a weak check for valid- ity of the name. NAME_REGEX is described in adduser.conf(5). --gecos GECOS Set the gecos field for the new entry generated. adduser will not ask for finger information if this option is given. --gid ID When creating a group, this option forces the new groupid to be the given number. When creating a user, this option will put the user in that group. --group When combined with --system, a group with the same name and ID as the system user is created. If not combined with --system, a group with the given name is created. This is the default action if the program is invoked as addgroup. --help Display brief instructions. --home DIR Use DIR as the user's home directory, rather than the default specified by the configuration file. If the directory does not exist, it is created and skeleton files are copied. --shell SHELL Use SHELL as the user's login shell, rather than the default specified by the configuration file. --ingroup GROUP Add the new user to GROUP instead of a usergroup or the default group defined by USERS_GID in the configuration file. This affects the users primary group. To add additional groups, see the add_extra_groups option. --no-create-home Do not create the home directory, even if it doesn't exist. --quiet Suppress informational messages, only show warnings and errors. --debug Be verbose, most useful if you want to nail down a problem with adduser. --system Create a system user or group. --uid ID Force the new userid to be the given number. adduser will fail if the userid is already taken. --firstuid ID Override the first uid in the range that the uid is chosen from (overrides FIRST_UID specified in the configuration file). --lastuid ID Override the last uid in the range that the uid is chosen from ( LAST_UID ) --add_extra_groups Add new user to extra groups defined in the configuration file. --version Display version and copyright information. EXIT VALUES
0 The user exists as specified. This can have 2 causes: The user was created by adduser or the user was already present on the system before adduser was invoked. If adduser was returning 0 , invoking adduser a second time with the same parameters as before also returns 0. 1 Creating the user or group failed because it was already present with other UID/GID than specified. The username or groupname was rejected because of a mismatch with the configured regular expressions, see adduser.conf(5). Adduser has been aborted by a signal. Or for many other yet undocumented reasons which are printed to console then. You may then consider to remove --quiet to make adduser more verbose. FILES
/etc/adduser.conf Default configuration file for adduser and addgroup /usr/local/sbin/adduser.local Optional custom add-ons. SEE ALSO
adduser.conf(5), deluser(8), groupadd(8), useradd(8), usermod(8), Debian Policy 9.2.2. COPYRIGHT
Copyright (C) 1997, 1998, 1999 Guy Maor. Modifications by Roland Bauerschmidt and Marc Haber. Additional patches by Joerg Hoh and Stephen Gran. Copyright (C) 1995 Ted Hajek, with a great deal borrowed from the original Debian adduser Copyright (C) 1994 Ian Murdock. adduser is free software; see the GNU General Public Licence version 2 or later for copying conditions. There is no warranty. Debian GNU/Linux Version 3.116ubuntu1 ADDUSER(8)
All times are GMT -4. The time now is 08:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy