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)
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)
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)
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)
Hi,
I have two little issues:
1) there is possible in sh to create a function who return a boolean value?
2)i have to verify if an user belongs to a group and i think it is needed to create a function which take two parameter and return a boolean value. in fact i have to parse /etc/group... (5 Replies)
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)
Hi,
I need to modify the user 'munfai' by adding it into groups bscs, oinstall, dba.
I use this command as user root to add the user into the mentioned groups :
# usermod -G bscs,oinstall,dba munfai
I can thereafter see the id in the groups :
# id munfai
uid=258(munfai) gid=20(users)... (2 Replies)
Discussion started by: anaigini45
2 Replies
LEARN ABOUT NETBSD
id
ID(1) BSD General Commands Manual ID(1)NAME
id -- return user identity
SYNOPSIS
id [user]
id -G [-n] [user]
id -g [-nr] [user]
id -p [user]
id -u [-nr] [user]
DESCRIPTION
The id utility displays the user and group names and numeric IDs, of the calling process, to the standard output. If the real and effective
IDs are different, both are displayed, otherwise only the real ID is displayed.
If a user (login name or user ID) is specified, the user and group IDs of that user are displayed. In this case, the real and effective IDs
are assumed to be the same.
The options are as follows:
-G Display the different group IDs (effective, real and supplementary) as white-space separated numbers, in no particular order.
-g Display the effective group ID as a number.
-n Display the name of the user or group ID for the -G, -g and -u options instead of the number. If any of the ID numbers cannot be
mapped into names, the number will be displayed as usual.
-p Make the output human-readable. If the user name returned by getlogin(2) is different from the login name referenced by the user ID,
the name returned by getlogin(2) is displayed, preceded by the keyword ``login''. The user ID as a name is displayed, preceded by
the keyword ``uid''. If the effective user ID is different from the real user ID, the real user ID is displayed as a name, preceded
by the keyword ``euid''. If the effective group ID is different from the real group ID, the real group ID is displayed as a name,
preceded by the keyword ``rgid''. The list of groups to which the user belongs is then displayed as names, preceded by the keyword
``groups''. Each display is on a separate line.
-r Display the real ID for the -g and -u options instead of the effective ID.
-u Display the effective user ID as a number.
The id utility exits 0 on success, and >0 if an error occurs.
SEE ALSO who(1)STANDARDS
The id function is expected to conform to IEEE Std 1003.2 (``POSIX.2'').
HISTORY
The historic groups(1) command is equivalent to ``id -Gn [user]''.
The historic whoami(1) command is equivalent to ``id -un''.
The id command first appeared in 4.4BSD.
BSD May 5, 1994 BSD