Sponsored Content
Full Discussion: usermod in AIX
Operating Systems AIX usermod in AIX Post 302517810 by masterpengu on Wednesday 27th of April 2011 09:37:40 PM
Old 04-27-2011
man chuser
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

usermod -e

I'm trying to add an expiration to all of the local logins, but everytime I do the: usermod -e <date> <login> command, I get a error msg "usermod error <date> is not a valid expiration date. CHoose another" I've tried 6/26/06, June 26, 2006, 26/6/06, 6/26/2006 everything I can think of. ... (1 Reply)
Discussion started by: amheck
1 Replies

2. Solaris

help interpreting usermod man page

Hi, I put an expiration on a few id's that I want to remove now. From the man page -e expire Specify the future date on which a login can no longer be used; after this date, no user will be able to access this login. This option is useful ... (0 Replies)
Discussion started by: amheck
0 Replies

3. UNIX for Dummies Questions & Answers

Help required for usermod command

Hi, I would need to modify my machine name : When i give "w" command, i am getting following message USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT krishnag pts/59 gunasekar 1:25pm 25:15 0.03s 0.03s -csh. My questions is, i need to change FROM (i.e... (1 Reply)
Discussion started by: gun
1 Replies

4. Shell Programming and Scripting

Usermod returning syntax error

"sudo usermod -d /home/${user1} -g $primgroup -Gn $grouplist -u $zaquid -p apple1 $user1" What's wrong with this command? (6 Replies)
Discussion started by: syndex
6 Replies

5. Solaris

usermod vs rolemod

Hello, I'm a bit confused by the usage of those two commands. I have 2 freshly installed systems and the behaviour is different from one system to another. root@systemONE rolemod -G mygroup postgres UX: rolemod: ERROR: Users most be modified with ``usermod''. root@systemTWO usermod -G... (6 Replies)
Discussion started by: Tex-Twil
6 Replies

6. Shell Programming and Scripting

usermod -p not working in HP Unix

Hi; Im working on HP -UX B.11.11 U 9000/800 , I come from a Linux background and i m not so good at HP UX.Here is the issue I need to reset the password of some 100 users at one go ,on linux I used to do it.I wrote a small code in linux and it worked a charm here is the code ,where... (2 Replies)
Discussion started by: maverick_here
2 Replies

7. UNIX and Linux Applications

Usermod pam in hpux

On pam.conf usermod auth required libpam_hpsec.so.1 usermod auth sufficient libpam_krb5.so.1 usermod auth required libpam_unix.so.1 try_first_pass usermod account required libpam_hpsec.so.1 usermod account sufficient libpam_krb5.so.1 usermod account required... (0 Replies)
Discussion started by: Linusolaradm1
0 Replies

8. Red Hat

Usermod doesn't work on root

Hi, I am root user. I need to add more groups to the account. I usse the below command but no apparent result # id uid=0(root) gid=0(root) groups=0(root) # usermod -a -G 302,301,303 root # id uid=0(root) gid=0(root) groups=0(root) # What can be the reason? (6 Replies)
Discussion started by: BearCheese
6 Replies

9. Solaris

Usermod cannot working

i install Solaris 11.2 , Oracle Corporation SunOS 5.11 11.2 April 2015 and make 2 zones for Oracle RAC non-global zones : rac1, rac2 in zones i create group's and user's /usr/sbin/groupadd -g 1000 oinstall /usr/sbin/groupadd -g 1020 asmadmin /usr/sbin/groupadd -g 1021... (2 Replies)
Discussion started by: penchev
2 Replies

10. UNIX for Beginners Questions & Answers

Adding user to a group (usermod or gpasswd)

I believe there are two methods of adding a user to a group. using usermod and gpasswd. but most of the time we tent to use user mod. does there any difference between these two methods .... gpasswd -a geek admins usermod -a -G admins geek both code add user geek to a group admin (1 Reply)
Discussion started by: lobsang
1 Replies
usermod(1M)                                                                                                                            usermod(1M)

NAME
usermod - modify a user's login information on the system SYNOPSIS
usermod [ -u uid [-o]] [-g group] [ -G group [ , group...]] [ -d dir [-m]] [-s shell] [-c comment] [-l new_name] [-f inactive] [-e expire] [-A authorization [, authorization]] [-P profile [, profile]] [-R role [, role]] [-K key=value] login The usermod utility modifies a user's login definition on the system. It changes the definition of the specified login and makes the appro- priate login-related system file and file system changes. The system file entries created with this command have a limit of 512 characters per line. Specifying long arguments to several options may exceed this limit. The following options are supported: -A authorization One or more comma separated authorizations as defined in auth_attr(4). Only a user or role who has grant rights to the authorization can assign it to an account. This replaces any existing authorization setting. If no authoriza- tion list is specified, the existing setting is removed. -c comment Specify a comment string. comment can be any text string. It is generally a short description of the login, and is currently used as the field for the user's full name. This information is stored in the user's /etc/passwd entry. -d dir Specify the new home directory of the user. It defaults to base_dir/login, where base_dir is the base directory for new login home directories, and login is the new login. -e expire Specify the expiration date for a login. After this date, no user will be able to access this login. The expire option argument is a date entered using one of the date formats included in the template file /etc/datemsk. See getdate(3C). For example, you may enter 10/6/90 or October 6, 1990. A value of `` '' defeats the status of the expired date. -f inactive Specify the maximum number of days allowed between uses of a login ID before that login ID is declared invalid. Normal values are positive integers. A value of 0 defeats the status. -g group Specify an existing group's integer ID or character-string name. It redefines the user's primary group membership. -G group Specify an existing group's integer "ID" "," or character string name. It redefines the user's supplementary group membership. Duplicates between group with the -g and -G options are ignored. No more than NGROUPS_UMAX groups may be specified as defined in <param.h>. -K key=value Replace existing or add to a user's key=value pair attributes. Multiple -K options may be used to replace or add multiple key=value pairs. The generic -K option with the appropriate key may be used instead of the specific implied key options (-A, -P, -R, -p). See user_attr(4) for a list of valid key=value pairs. The "type" key is not a valid key for this option. Keys may not be repeated. Specifying a key= without a value removes an existing key=value pair. The "type" key may only be specified without a value or with the "role" value for this option. Specifying the "type" key without a value leaves the account as a normal user, with the "role" value changing from a normal user to a role user. As a role account, no roles (-R or roles=value) may be present. -l new_logname Specify the new login name for the user. The new_logname argument is a string no more than eight bytes consisting of characters from the set of alphabetic characters, numeric characters, period (.), underline (_), and hyphen (-). The first character should be alphabetic and the field should contain at least one lower case alphabetic character. A warning message will be written if these restrictions are not met. A future Solaris release may refuse to accept login fields that do not meet these requirements. The new_logname argument must contain at least one character and must not contain a colon (:) or NEWLINE ( ). -m Move the user's home directory to the new directory specified with the -d option. If the directory already exists, it must have permissions read/write/execute by group, where group is the user's primary group. -o This option allows the specified UID to be duplicated (non-unique). -P profile One or more comma-separated rights profiles defined in prof_attr(4). This replaces any existing profile setting. If no profile list is specified, the existing setting is removed. -R role One or more comma-separated roles (see roleadd(1M)). This replaces any existing role setting. If no role list is specified, the existing setting is removed. -s shell Specify the full pathname of the program that is used as the user's shell on login. The value of shell must be a valid executable file. -u uid Specify a new UID for the user. It must be a non-negative decimal integer less than MAXUID as defined in <param.h>. The UID associated with the user's home directory is not modified with this option; a user will not have access to their home directory until the UID is manually reassigned using chown(1). The following operands are supported: login An existing login name to be modified. In case of an error, usermod prints an error message and exits with one of the following values: 2 The command syntax was invalid. A usage message for the usermod command is displayed. 3 An invalid argument was provided to an option. 4 The uid given with the -u option is already in use. 5 The password files contain an error. pwconv(1M) can be used to correct possible errors. See passwd(4). 6 The login to be modified does not exist, the group does not exist, or the login shell does not exist. 8 The login to be modified is in use. 9 The new_logname is already in use. 10 Cannot update the /etc/group or /etc/user_attr file. Other update requests will be implemented. 11 Insufficient space to move the home directory (-m option). Other update requests will be implemented. 12 Unable to complete the move of the home directory to the new home directory. /etc/group system file containing group definitions /etc/datemsk system file of date formats /etc/passwd system password file /etc/shadow system file containing users' encrypted passwords and related information /etc/user_attr system file containing additional user and role attributes See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ chown(1), passwd(1), users(1B), groupadd(1M), groupdel(1M), groupmod(1M), logins(1M), pwconv(1M), roleadd(1M), roledel(1M), rolemod(1M), useradd(1M), userdel(1M), getdate(3C), auth_attr(4), passwd(4), attributes(5) The usermod utility modifies passwd definitions only in the local /etc/passwd and /etc/shadow files. If a network nameservice such as NIS or NIS+ is being used to supplement the local files with additional entries, usermod cannot change information supplied by the network nameservice. However usermod will verify the uniqueness of user name and user ID against the external nameservice. The usermod utility uses the /etc/datemsk file, available with SUNWaccr, for date formatting. 1 Jul 2004 usermod(1M)
All times are GMT -4. The time now is 10:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy