Sponsored Content
Full Discussion: Usermod cannot working
Operating Systems Solaris Usermod cannot working Post 302966608 by MadeInGermany on Sunday 14th of February 2016 12:03:36 PM
Old 02-14-2016
The /usr/bin/id needs -a to print the additional groups.
Code:
id -a oracle
/usr/xpg4/bin/id oracle
groups oracle

This User Gave Thanks to MadeInGermany For This Post:
 

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. AIX

usermod in AIX

Hello All, Could you please let me know if the usermod command works in AIX? If yes, on what versions? We have a situation in which we need to change the UID of few users who have the same UID as root. We have changed it in /etc/passwd for now but want to use usermod in future. The syntax is as... (2 Replies)
Discussion started by: lovesaikrishna
2 Replies

8. Solaris

audit useradd userdel usermod in solaris 10

the previous thread on this problem was closed with no resolution/workaround that i could see...have there been any breakthroughs? :wall: (0 Replies)
Discussion started by: lisah66
0 Replies

9. 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

10. 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
id(1M)							  System Administration Commands						    id(1M)

NAME
id - return user identity SYNOPSIS
/usr/bin/id [-p] [user] /usr/bin/id -a [-p] [user] /usr/bin/id -G [-n] [user] /usr/bin/id -g [-nr] [user] /usr/bin/id -u [-nr] [user] /usr/xpg4/bin/id [-p] [user] /usr/xpg4/bin/id -a [-p] [user] /usr/xpg4/bin/id -G [-n] [user] /usr/xpg4/bin/id -g [-nr] [user] /usr/xpg4/bin/id -u [-nr] [user] DESCRIPTION
If no user operand is provided, the id utility writes the user and group IDs and the corresponding user and group names of the invoking process to standard output. If the effective and real IDs do not match, both are written. If multiple groups are supported by the underly- ing system, /usr/xpg4/bin/id also writes the supplementary group affiliations of the invoking process. If a user operand is provided and the process has the appropriate privileges, the user and group IDs of the selected user are written. In this case, effective IDs are assumed to be identical to real IDs. If the selected user has more than one allowable group membership listed in the group database, /usr/xpg4/bin/id writes them in the same manner as the supplementary groups described in the preceding paragraph. Formats The following formats are used when the LC_MESSAGES locale category specifies the "C" locale. In other locales, the strings uid, gid, euid, egid, and groups may be replaced with more appropriate strings corresponding to the locale. "uid=%u(%s) gid=%u(%s) " <real user ID>, <user-name>, <real group ID>, <group-name> If the effective and real user IDs do not match, the following are inserted immediately before the character in the previous format: " euid=%u(%s)" with the following arguments added at the end of the argument list: <effective user ID>, <effective user-name> If the effective and real group IDs do not match, the following is inserted directly before the character in the format string (and after any addition resulting from the effective and real user IDs not matching): " egid=%u(%s)" with the following arguments added at the end of the argument list: <effectivegroup-ID>, <effectivegroupname> If the process has supplementary group affiliations or the selected user is allowed to belong to multiple groups, the first is added directly before the NEWLINE character in the format string: " groups=%u(%s)" with the following arguments added at the end of the argument list: <supplementary group ID>, <supplementary group name> and the necessary number of the following added after that for any remaining supplementary group IDs: ",%u(%s)" and the necessary number of the following arguments added at the end of the argument list: <supplementary group ID>, <supplementary group name> If any of the user ID, group ID, effective user ID, effective group ID or supplementary/multiple group IDs cannot be mapped by the system into printable user or group names, the corresponding (%s) and name argument is omitted from the corresponding format string. When any of the options are specified, the output format is as described under OPTIONS. OPTIONS
The following options are supported by both /usr/bin/id and /usr/xpg4/bin/id. The -p and -a options are invalid if specified with any of the -G, -g, or -u options. -p Reports additionally the current project membership of the invoking process. The project is reported using the format: "projid=%u(%s)" which is inserted prior to the 0fR character of the default format described in the Formats section. The arguments <project ID>,<project name> are appended to the end of the argument list. If the project ID cannot be mapped by the system into a printable project name, the corresponding (%s) and name argument is omitted from the corresponding format string. -a Reports user name, user ID and all the groups to which the user belongs. -G Outputs all different group IDs (effective, real and supplementary) only, using the format "%u ". If there is more than one distinct group affiliation, output each such affiliation, using the format " %u", before the NEWLINE character is output. -g Outputs only the effective group ID, using the format "%u ". -n Outputs the name in the format "%s" instead of the numeric ID using the format "%u". -r Outputs the real ID instead of the effective ID. -u Outputs only the effective user ID, using the format "%u ". OPERANDS
The following operand is supported: user The user (login) name for which information is to be written. ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of id: LANG, LC_ALL, LC_CTYPE, LC_MES- SAGES, and NLSPATH. EXIT STATUS
The following exit values are returned: 0 Successful completion. >0 An error occurred. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: /usr/bin/id +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu, SUNWcar | +-----------------------------+-----------------------------+ |Interface Stability |Stable | +-----------------------------+-----------------------------+ /usr/xpg4/bin/id +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWxcu4 | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ SEE ALSO
fold(1), logname(1), who(1), getgid(2), getgroups(2), getprojid(2), getuid(2), attributes(5), environ(5), standards(5) NOTES
Output produced by the -G option and by the default case could potentially produce very long lines on systems that support large numbers of supplementary groups. SunOS 5.11 28 Nov 2006 id(1M)
All times are GMT -4. The time now is 10:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy