Sponsored Content
Full Discussion: Usermod cannot working
Operating Systems Solaris Usermod cannot working Post 302966605 by penchev on Sunday 14th of February 2016 12:01:06 PM
Old 02-14-2016
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

Code:
/usr/sbin/groupadd -g 1000 oinstall
/usr/sbin/groupadd -g 1020 asmadmin
/usr/sbin/groupadd -g 1021 asmdba
/usr/sbin/groupadd -g 1022 asmoper
/usr/sbin/groupadd -g 1031 dba
/usr/sbin/groupadd -g 1032 oper

useradd -u 1101 -m -s /bin/bash -g oinstall -G dba,oper,asmdba oracle

passwd oracle

useradd -u 1100 -m -s /bin/bash -g oinstall -G asmoper,asmdba,asmadmin,dba grid

passwd grid

-------------------------

but when check user id :


Code:
[root@rac1 ~]# id oracle
uid=1101(oracle) gid=1000(oinstall)
[root@rac1 ~]# id grid
uid=1100(grid) gid=1000(oinstall)
[root@rac1 ~]#

oracle not add to groups : dba,oper,asmdba
grid not add to groups : asmoper,asmdba,asmadmin,dba

try this :

Code:
[root@rac1 ~]# usermod -g oinstall -G dba,oper,asmdba oracle
[root@rac1 ~]# usermod -g oinstall -G asmoper,asmdba,asmadmin,dba grid
[root@rac1 ~]# id oracle
uid=1101(oracle) gid=1000(oinstall)
[root@rac1 ~]# id grid
uid=1100(grid) gid=1000(oinstall)
[root@rac1 ~]#


...not understand where is problem , need a help

---------- Post updated at 07:01 PM ---------- Previous update was at 06:46 PM ----------

Oooh, sorry for my lame post ...

Code:
[root@rac1 ~]# id oracle
uid=1101(oracle) gid=1000(oinstall)
[root@rac1 ~]# id grid
uid=1100(grid) gid=1000(oinstall)
[root@rac1 ~]#

use wrong command only id ,, but when use id -ap ..output is :

Code:
[root@rac1 ~]# id -ap oracle
uid=1101(oracle) gid=1000(oinstall) groups=1000(oinstall),1021(asmdba),1031(dba),1032(oper) projid=3(default)
[root@rac1 ~]# id -ap grid
uid=1100(grid) gid=1000(oinstall) groups=1000(oinstall),1020(asmadmin),1021(asmdba),1022(asmoper),1031(dba) projid=3(default)
[root@rac1 ~]#


Last edited by Scrutinizer; 02-14-2016 at 04:08 PM.. Reason: code tags
 

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
groupadd(1M)						  System Administration Commands					      groupadd(1M)

NAME
groupadd - add (create) a new group definition on the system SYNOPSIS
/usr/sbin/groupadd [ -g gid [-o]] group DESCRIPTION
The groupadd command creates a new group definition on the system by adding the appropriate entry to the /etc/group file. OPTIONS
The following options are supported: -g gid Assigns the group id gid for the new group. This group id must be a non-negative decimal integer below MAXUID as defined in /usr/include/sys/param.h. The group ID defaults to the next available (unique) number above the highest number currently assigned. For example, if groups 100, 105, and 200 are assigned as groups, the next default group number will be 201. (Group IDs from 0-99 are reserved by SunOS for future applications.) -o Allows the gid to be duplicated (non-unique). OPERANDS
The following operands are supported: group A string consisting of characters from the set of lower case alphabetic characters and numeric characters. A warning message will be written if the string exceeds MAXGLEN, which is usually set at eight characters. The group field must contain at least one character; it accepts lower case or numeric characters or a combination of both, and must not contain a colon (:) or NEWLINE. EXIT STATUS
The following exit values are returned: 0 Successful completion. 2 Invalid command syntax. A usage message for the groupadd command is displayed. 3 An invalid argument was provided to an option. 4 The gid is not unique (when -o option is not used). 9 The group is not unique. 10 The /etc/group file cannot be updated. FILES
/etc/group /usr/include/userdefs.h ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
users(1B), groupdel(1M), groupmod(1M), grpck(1M), logins(1M), pwck(1M), useradd(1M), userdel(1M), usermod(1M), group(4), attributes(5) NOTES
groupadd only adds a group definition to the local system. If a network name service such as NIS or NIS+ is being used to supplement the local /etc/group file with additional entries, groupadd cannot change information supplied by the network name service. However, groupadd will verify the uniqueness of group name and group ID against the external name service. SunOS 5.10 27 Mar 1998 groupadd(1M)
All times are GMT -4. The time now is 07:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy