Sponsored Content
Top Forums Shell Programming and Scripting AIX os level 6.1 for list of users and groups Post 302466616 by rdcwayx on Tuesday 26th of October 2010 08:11:57 PM
Old 10-26-2010
first you need compare if output format are same in AIX 5 or 6 by below command:

Code:
lsuser -a pgrp groups ALL

my AIX 5 sample output:

Code:
root pgrp=system groups=system,bin,sys,security,cron,audit,lp

Second, your command can be rewritten by one command, no temp file need be generated.

Code:
lsuser -a pgrp groups ALL |sed 's/pgrp=//;s/groups=//'

 

10 More Discussions You Might Find Interesting

1. Cybersecurity

Users and groups

Hi, Is it possible that one user belongs to many groups, or the relation of user/group is 1/1?. Thanks Ramón (2 Replies)
Discussion started by: rsanz
2 Replies

2. Linux

listing users and groups

RH 7.2 I'm trying to list the users & groups on my machine. I found the lsuser & lsgroup commands but no associated man pages. I typed: lsuser I get --> Valid options are: -a So I typed: lsuser -a I get --> Valid options are: groups, home So I typed: lsuser -a groups I get -->... (2 Replies)
Discussion started by: jalburger
2 Replies

3. UNIX for Dummies Questions & Answers

users and groups

hi eveyone i've recently requested my unix admin to create a userid for 2 groups. He created the id and i can see it by grep "id" /etc/group. But when i login with that id into unix and try to cd that group it says permission denied. something like cd /groupname -- permission denied Can my admin... (1 Reply)
Discussion started by: sammet
1 Replies

4. Solaris

Defaults number of users and Groups

Hi All, I would like know how many of default number of users and groups are there in solaris-10... Regards Tirupathi Raju (2 Replies)
Discussion started by: tirupathiraju_t
2 Replies

5. AIX

Vulnerability AIX server (GROUPS/USERS) and SAP Systems ?

I hope you can understand me, although my english is not so good. I have a problem. I have installed 4 SAP Systems with different releases on the same server (AIX). Each SAP system has got its own operating system user through the installation. But all users belong to the group SAPSYS. So in other... (3 Replies)
Discussion started by: momok1976
3 Replies

6. Solaris

Removing users from groups

How do I remove a user from a group? I'm using the usermod command but its not working. I have a user "abc" who is a member of the groups root and other. I'm trying to remove him from the group "other" (using CLI) which is his secondary group but it's not working. How do I do this? Is there any... (11 Replies)
Discussion started by: the_red_dove
11 Replies

7. Emergency UNIX and Linux Support

List of users on an AIX system

Is there a way to generate a list of users with name, user ID, and Security Group? It is urgent for audit purposes. Please help. (5 Replies)
Discussion started by: ggayathri
5 Replies

8. UNIX for Dummies Questions & Answers

List users and groups

Hi I am new to unix so hopefully someone can help. I need to list all the users I have in my unix enviroment (AIX) and the groups (primary and secondary) they belong to. Can anyone help? Many thanks in advance (2 Replies)
Discussion started by: m3y
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. UNIX for Advanced & Expert Users

Creating groups and users

Hi Could anyone please suggest how we can check in Linux if a user or a group name is already existing? In case of a user the command should also be able to specify the user with a given directory and shell. We can of course check this using a grep command but since that is just a pattern match,... (12 Replies)
Discussion started by: Dorothy
12 Replies
asadmin-list-file-groups(1AS)					   User Commands				     asadmin-list-file-groups(1AS)

NAME
asadmin-list-file-groups, list-file-groups - lists the file groups SYNOPSIS
list-file-groups --user admin_user [--password admin_password] [--host localhost] [--port 4848] [--secure|-s] [--passwordfile filename] [--terse=false] [--echo=false] [--interactive=true] [--authrealmname auth_realm_name] [--name username] Lists the available groups in the file user. If the name option is not specified, then all groups are listed. This command is supported in remote mode only. OPTIONS
--user authorized domain application server administrative username. --password password to administer the domain application server. --host machine name where the domain application server is running. --port port number of the domain application server listening for administration requests. --secure if true, uses SSL/TLS to communicate with the domain application server. --passwordfile file containing the domain application server password. --terse indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well- formatted data for consumption by a script. Default is false. --echo setting to true will echo the command line statement on the standard output. Default is false. --interactive if set to true (default), only the required password options are prompted. --authrealmname filename where you have different stores for file auth realm. --name name of the file user. Example 1: Using the list-file-groups command asadmin> list-file-groups --user admin1 --password adminadmin1 --host pigeon --port 5001 --name sample_user Command list-file-groups executed successfully EXIT STATUS
0 command executed successfully 1 error in executing the command asadmin-delete-file-user(1AS), asadmin-update-file-user(1AS), asadmin-create-file-user(1AS), asadmin-list-file-users(1AS) J2EE 1.4 SDK March 2004 asadmin-list-file-groups(1AS)
All times are GMT -4. The time now is 08:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy