Sponsored Content
Full Discussion: usermod vs rolemod
Operating Systems Solaris usermod vs rolemod Post 302333496 by Tex-Twil on Monday 13th of July 2009 08:55:41 AM
Old 07-13-2009
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.

Code:
root@systemONE rolemod -G mygroup postgres
UX: rolemod: ERROR: Users most be modified with ``usermod''.


root@systemTWO usermod -G mygroup postgres
UX: usermod: ERROR: Roles most be modified with ``rolemod''.

So how can I know which command do I have to use to add a user to a group ?

Thanks,
Tex

Last edited by Tex-Twil; 07-13-2009 at 12:09 PM..
 

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

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

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

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

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

10. 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
user_attr(4)                                                       File Formats                                                       user_attr(4)

NAME
user_attr - extended user attributes database SYNOPSIS
/etc/user_attr DESCRIPTION
/etc/user_attr is a local source of extended attributes associated with users and roles. user_attr can be used with other user attribute sources, including the LDAP people container, the user_attr NIS map, and the user_attr NIS+ table. Programs use the getuserattr(3SECDB) routines to gain access to this information. The search order for multiple user_attr sources is specified in the /etc/nsswitch.conf file, as described in the nsswitch.conf(4) man page. The search order follows that for passwd(4). Each entry in the user_attr databases consists of a single line with five fields separated by colons (:). Line continuations using the backslash () character are permitted. Each entry has the form: user:qualifier:res1:res2:attr user The name of the user as specified in the passwd(4) database. qualifier Reserved for future use. res1 Reserved for future use. res2 Reserved for future use. attr An optional list of semicolon-separated (;) key-value pairs that describe the security attributes to apply to the object upon execu- tion. Zero or more keys may be specified. The following keys are currently interpreted by the system: auths Specifies a comma-separated list of authorization names chosen from those names defined in the auth_attr(4) database. Authorization names may be specified using the asterisk (*) character as a wildcard. For example, solaris.printer.* means all of Sun's printer authorizations. profiles Contains an ordered, comma-separated list of profile names chosen from prof_attr(4). Profiles are enforced by the profile shells, pfcsh, pfksh, and pfsh. See pfsh(1). A default profile is assigned in /etc/security/policy.conf (see policy.conf(4)). If no pro- files are assigned, the profile shells do not allow the user to execute any commands. roles Can be assigned a comma-separated list of role names from the set of user accounts in this database whose type field indicates the account is a role. If the roles key value is not specified, the user is not permitted to assume any role. type Can be assigned one of these strings: normal, indicating that this account is for a normal user, one who logs in; or role, indicat- ing that this account is for a role. Roles can only be assumed by a normal user after the user has logged in. project Can be assigned a name of one project from the project(4) database to be used as a default project to place the user in at login time. For more information, see getdefaultproj(3PROJECT). defaultpriv The default set of privileges assigned to a user's inheritable set upon login. limitpriv The maximum set of privileges a user or any process started by the user, whether through su(1M) or any other means, can obtain. The system administrator must take extreme care when removing privileges from the limit set. Removing any basic privilege has the abil- ity of crippling all applications; removing any other privilege can cause many or all applications requiring privileges to malfunc- tion. See privileges(5) for a description of privileges. The command ppriv -l (see ppriv(1)) produces a list of all supported privileges. Note that you specify privileges as they are displayed by ppriv. In privileges(5), privileges are listed in the form PRIV_<privi- lege_name>. For example, the privilege file_chown, as you would specify it in user_attr, is listed in privileges(5) as PRIV_FILE_CHOWN. lock_after_retries Specifies whether an account is locked after the count of failed logins for a user equals or exceeds the allowed number of retries as defined by RETRIES in /etc/default/login. Possible values are yes or no. The default is no. Account locking is applicable only to local accounts. Except for the type key, the key=value fields in /etc/user_attr can be added using roleadd(1M) and useradd(1M). You can use rolemod(1M) and usermod(1M) to modify key=value fields in /etc/user_attr. Modification of the type key is restricted as described in rolemod and usermod. EXAMPLES
Example 1: Assigning a Profile to Root The following example entry assigns to root the All profile, which allows root to use all commands in the system, and also assigns two authorizations: root::::auths=solaris.*,solaris.grant;profiles=All;type=normal The solaris.* wildcard authorization shown above gives root all the solaris authorizations; and the solaris.grant authorization gives root the right to grant to others any solaris authorizations that root has. The combination of authorizations enables root to grant to others all the solaris authorizations. See auth_attr(4) for more about authorizations. FILES
/etc/nsswitch.conf See nsswitch.conf(4). /etc/user_attr Described here. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
auths(1), pfcsh(1), pfksh(1), pfsh(1), ppriv(1), profiles(1), roles(1), roleadd(1M), rolemod(1M), useradd(1M), usermod(1M), getdefault- proj(3PROJECT), getuserattr(3SECDB), auth_attr(4), exec_attr(4), nsswitch.conf(4), passwd(4), policy.conf(4), prof_attr(4), project(4), attributes(5), privileges(5) NOTES
When deciding which authorization source to use, if you are not using LDAP, keep in mind that NIS+ provides stronger authentication than NIS. The root user is usually defined in local databases for a number of reasons, including the fact that root needs to be able to log in and do system maintenance in single-user mode, before the network name service databases are available. For this reason, an entry should exist for root in the local user_attr file, and the precedence shown in the example nsswitch.conf(4) file entry under EXAMPLES is highly recommended. Because the list of legal keys is likely to expand, any code that parses this database must be written to ignore unknown key-value pairs without error. When any new keywords are created, the names should be prefixed with a unique string, such as the company's stock symbol, to avoid potential naming conflicts. In the attr field, escape the following symbols with a backslash () if you use them in any value: colon (:), semicolon (;), carriage return ( ), equals (=), or backslash (). SunOS 5.10 16 Mar 2004 user_attr(4)
All times are GMT -4. The time now is 01:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy