Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to add user to multiple groups Post 302443530 by ygemici on Monday 9th of August 2010 07:00:52 AM
Old 08-09-2010
Quote:
Originally Posted by kalyankalyan
hi all

i am new to solaris

how to add a user to multiple(secondary) groups.

user :anna
Groups : delhi ,mumbai,pune

i need like this in cat /etc/group
PHP Code:
delhi::anna
mumbai
::anna
pune
::anna 
i tried using
PHP Code:
usermod --G hyd anna 
that does int work

how to delete user from group in solaris

if i use userdel -r anna gelhi

user is geleted from /etc/passwd

pls help
Add to group
Code:
 
# usermod -G hyd anna  

Remove from groups
Code:
 
# usermod -G "" anna  


 

10 More Discussions You Might Find Interesting

1. Solaris

Removing user from multiple groups via command line

Want to know if any, a command line parameter(s) of removing a user from multiple groups without using any ineractive application? (1 Reply)
Discussion started by: jquizon62
1 Replies

2. Shell Programming and Scripting

User add on multiple servers

I have 85 Unix servers & I need to add single user ID on multiple servers at same time Can anyone help in this? I have written one script for single servers.same I need to user for multiple servers #!/bin/sh echo Enter user login ID read loginID echo Enter Group ID read GroupID ... (6 Replies)
Discussion started by: sandeep_pan
6 Replies

3. UNIX for Dummies Questions & Answers

dynamic user groups

Is it possible to dynamically allocate a new user group to an existing session on Solaris 5.8 I'd like to be able to allow certain users to access a set of scripts for the life of session (preferably there own session not a specific login created for the purpose) by dynamically giving the session... (0 Replies)
Discussion started by: hammer
0 Replies

4. UNIX for Dummies Questions & Answers

Adding user to groups

How do I add a user to a group? And how do I determine the list of groups to add a user? Solaris 10 newbie (1 Reply)
Discussion started by: peteythapitbull
1 Replies

5. UNIX for Dummies Questions & Answers

User groups

Hi I have a user zak and 4 groups:- oracle stats data archive I want user zak to be part of the oracle and stats group but not be able to view,list anything in data and archive. Also anyone in the data and archive group should not be able to view,list anything in oracle and stats....... (3 Replies)
Discussion started by: Zak
3 Replies

6. Solaris

Setting user groups

Hi......... I'm trying to set a group of users to login to do a required super-user tasks without knowing the super-user passwd. For example...a user popodude logs in as self with passwd..system accepts the password & then automatically asks for the super-user account passwd. My goal is... (1 Reply)
Discussion started by: Remi
1 Replies

7. AIX

user & groups

1 - what is the maximum no: of groups a user can be a part of ? 2 - what is maximum no: of users a group can contain ? (6 Replies)
Discussion started by: senmak
6 Replies

8. AIX

Nested user groups

Is there a command to nest a group in another group in AIX. (2 Replies)
Discussion started by: daveisme
2 Replies

9. UNIX for Dummies Questions & Answers

Users in multiple groups?

Happy Thanksgiving Everyone!! I have a question about adding users to multiple groups. Thanks in advance Using Red Hat and here are the issues: Example: Users: Bob Mark Groups: SystemsAnalysts BusinessAnalysts If I am adding a user Bob to both groups (SystemsAnalysts and... (2 Replies)
Discussion started by: hansokl
2 Replies

10. AIX

Can we add multiple groups to a directory or a file ?

Hello, drwxr-x--- 21 root system 4096 Jan 25 10:20 /testdir here owner is root, group is system. 1) is it possible to add multiple groups to "/testdir" files/directories ? if yes, please provide me the command. my requirement is to provide read-only access to user1 on /testdir... (6 Replies)
Discussion started by: aaron8667
6 Replies
PTS_LISTOWNED(1)					       AFS Command Reference						  PTS_LISTOWNED(1)

NAME
pts_listowned - Show the Protection Database groups owned by a user or group SYNOPSIS
pts listowned -nameorid <user or group name or id>+ [-cell <cell name>] [-noauth] [-localauth] [-force] [-help] pts listo -na <user or group name or id>+ [-c <cell name>] [-no] [-l] [-f] [-h] DESCRIPTION
The pts listowned command lists the groups owned by each user or group specified by the -nameorid argument. To list any orphaned groups, whose owners have themselves been deleted from the Protection Database, provide a value of 0 (zero) for the -nameorid argument. To change the owner to a user or group that still exists, use the pts chown command. OPTIONS
-nameorid <user or group name or id>+ Specifies the name or AFS UID of each user, or the name or AFS GID of each group, for which to display the list of owned groups. It is acceptable to mix users and groups on the same command line, as well as names and IDs. Precede the GID of each group with a hyphen to indicate that it is negative. A value of 0 (zero) lists group entries for groups whose owners no longer have entries in the Protection Database. -cell <cell name> Names the cell in which to run the command. For more details, see pts(1). -force Enables the command to continue executing as far as possible when errors or other problems occur, rather than halting execution at the first error. -help Prints the online help for this command. All other valid options are ignored. -localauth Constructs a server ticket using a key from the local /etc/openafs/server/KeyFile file. Do not combine this flag with the -cell or -noauth options. For more details, see pts(1). -noauth Assigns the unprivileged identity anonymous to the issuer. For more details, see pts(1). OUTPUT
The first line of the output indicates the name and AFS UID or AFS GID of each user or group for which ownership information is requested, in the following format: Groups owned by <name> (id: <ID>) are: A list of groups follows. The list does not include groups owned by groups that the user or group owns, or to which the user or group belongs. If the user or group does not own any groups, only the header line appears. The following error message appears if the issuer is not privileged to view ownership information. By default, for both user and group entries the second privacy flag is the hyphen, which denies permission to anyone other than the user (for a user entry) and the members of the system:administrators group. pts: Permission denied so failed to get owner list for <name> (id: <ID>) EXAMPLES
The following example lists the groups owned by user terry and shows that the group "terry:friends" does not own any groups: % pts listowned terry terry:friends Groups owned by terry (id: 1045) are: terry:friends terry:project1 terry:project2 Groups owned by terry:friends (id: -673) are: PRIVILEGE REQUIRED
The required privilege depends on the setting of the second privacy flag in the Protection Database entry of each user or group indicated by the -nameorid argument (use the pts examine command to display the flags): o If it is the hyphen and the -nameorid argument specifies a group, only the members of the system:administrators group and the owner of a group can list the groups it owns. o If it is the hyphen and the -nameorid argument specifies a user, only the members of the system:administrators group and the associated user can list the groups he or she owns. o If it is uppercase letter "O", anyone who can access the cell's database server machines can list the groups owned by this user or group. SEE ALSO
pts(1), pts_chown(1), pts_examine(1), pts_setfields(1) COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved. This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. OpenAFS 2014-04-08 PTS_LISTOWNED(1)
All times are GMT -4. The time now is 12:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy