09-06-2019
List of all ids,groups, privilege ids
I wish to pull out a list of all user ids on the system, including the privileged ids, the groups to which they belong to. Sometimes after deleting an id also, its home dir does not get deleted or an entry is left behind in /etc/passwd.
Can someone help me with a script to achieve both.
10 More Discussions You Might Find Interesting
1. Programming
Hello,
Can some one tell how to read the thread IDs of the current process in Sun Solaris.
Any help will be appreciated.
regards,
Murali (0 Replies)
Discussion started by: hmurali
0 Replies
2. UNIX for Dummies Questions & Answers
What's the relationship beteew IDS and informix ? (1 Reply)
Discussion started by: wuhuatao
1 Replies
3. UNIX for Dummies Questions & Answers
hello friends,
i had this problem couldn't figure out. Every time i tried to su to an id by this command. it gave all killed command after that. Can't use it at all. ( OS Irix ). Any help greatly appreciated.
=========
server 23# su - hbl3121
Killed
Killed
Killed
Killed
Killed
Killed... (2 Replies)
Discussion started by: anphdula
2 Replies
4. Shell Programming and Scripting
How can I create a large list of document ids, about a 1,000 or more in a list without having to type them in?
If I can list these documents ids with one command I know how to transfer the output to a new vi list.
But how can I strip unwanted extra information in this list and leave only the... (1 Reply)
Discussion started by: ruben7566
1 Replies
5. Forum Support Area for Unregistered Users & Account Problems
Hi ,
Is it possible to list the user's email id for further communication.
Thanks,
MoonwalaPL (3 Replies)
Discussion started by: moonwalapl
3 Replies
6. UNIX for Advanced & Expert Users
Hello guys,
I have a file in the following format(each line seperated by TAB):
=========
Filename id
Filename id1
Filename id
Filename1 id7
Filename1 id7
Filename2 id1
Filename2 id1
Filename2 id3
Filename3 id2
Filename3 id4
Filename3 id4
Filename3 id6
=========
I would like to... (2 Replies)
Discussion started by: jingi1234
2 Replies
7. Emergency UNIX and Linux Support
I have a situation where I would like to retrieve a list of ids on AIX 5.3 server, which do not have proper gecos information. The need is to fix all of these ids before it gets flagged as an audit exposure. Can someone please help me with a command/script to retrieve this list?
G (3 Replies)
Discussion started by: ggayathri
3 Replies
8. Shell Programming and Scripting
Hi,
I wanted to check which all functional ids have been set up to be used as sftp functional ids? Where can I find this data in solaris machine? (1 Reply)
Discussion started by: sidnow
1 Replies
9. Emergency UNIX and Linux Support
I would like to capture the list of all users that belong to the "system" group. Or in other words all those who have privilege access on the system. Can someone please help me with a shell script/sed/awk code to obtain this please. (3 Replies)
Discussion started by: ggayathri
3 Replies
10. Shell Programming and Scripting
Hi,
I need to list out the processes which are started/restarted today in my Solaris box. If not possible need to convert the process uptime in minutes or seconds and compare it with a configurable value to list out those process ids for further processing in my scripting.
Can any one guide... (7 Replies)
Discussion started by: ananan
7 Replies
LEARN ABOUT OPENSOLARIS
semids
semids(2) System Calls semids(2)
NAME
semids - discover all semaphore identifiers
SYNOPSIS
#include <sys/sem.h>
int semids(int *buf, uint_t nids, uint_t *pnids);
DESCRIPTION
The semids() function copies all active semaphore identifiers from the system into the user-defined buffer specified by buf, provided that
the number of such identifiers is not greater than the number of integers the buffer can contain, as specified by nids. If the size of the
buffer is insufficient to contain all of the active semaphore identifiers in the system, none are copied.
Whether or not the size of the buffer is sufficient to contain all of them, the number of active semaphore identifiers in the system is
copied into the unsigned integer pointed to by pnids.
If nids is 0 or less than the number of active semaphore identifiers in the system, buf is ignored.
RETURN VALUES
Upon successful completion, semids() returns 0. Otherwise, -1 is returned and errno is set to indicate the error.
ERRORS
The semids() function will fail if:
EFAULT The buf or pnids argument points to an illegal address.
USAGE
The semids() function returns a snapshot of all the active semaphore identifiers in the system. More may be added and some may be removed
before they can be used by the caller.
EXAMPLES
Example 1 semids() example
This is sample C code indicating how to use the semids() function.
void
examine_semids()
{
int *ids = NULL;
uint_t nids = 0;
uint_t n;
int i;
for (;;) {
if (semids(ids, nids, &n) != 0) {
perror("semids");
exit(1);
}
if (n <= nids) /* we got them all */
break;
/* we need a bigger buffer */
ids = realloc(ids, (nids = n) * sizeof (int));
}
for (i = 0; i < n; i++)
process_semid(ids[i]);
free(ids);
}
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|MT-Level |Async-Signal-Safe |
+-----------------------------+-----------------------------+
SEE ALSO
ipcrm(1), ipcs(1), Intro(2), semctl(2), semget(2), semop(2), attributes(5)
SunOS 5.11 8 Mar 2000 semids(2)