09-07-2012
But my idea too is that 'id' should be a better approach. getent again is a pattern matching thing and could be ambiguous if there are users like test, test1, test2 and we are looking only for test user. Please correct me if i am wrong. I know that giving the correct pattern could be a solution, but the example I have taken is only a simple one. Is 'id' not the surest way to do this as compared to getent, grep etc.?
10 More Discussions You Might Find Interesting
1. Cybersecurity
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
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
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. UNIX for Dummies Questions & Answers
Is there a way to find out all users and the UNIX groups they belong to??
:) (3 Replies)
Discussion started by: Hangman2
3 Replies
5. Solaris
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
6. Solaris
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. UNIX for Dummies Questions & Answers
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
8. Shell Programming and Scripting
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)
Discussion started by: catalint
5 Replies
9. UNIX for Dummies Questions & Answers
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. HP-UX
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 DEBIAN
sss_usermod
SSS_USERMOD(8) SSSD Manual pages SSS_USERMOD(8)
NAME
sss_usermod - modify a user account
SYNOPSIS
sss_usermod [options] LOGIN
DESCRIPTION
sss_usermod modifies the account specified by LOGIN to reflect the changes that are specified on the command line.
OPTIONS
-c,--gecos COMMENT
Any text string describing the user. Often used as the field for the user's full name.
-h,--home HOME_DIR
The home directory of the user account.
-s,--shell SHELL
The user's login shell.
-a,--append-group GROUPS
Append this user to groups specified by the GROUPS parameter. The GROUPS parameter is a comma separated list of group names.
-r,--remove-group GROUPS
Remove this user from groups specified by the GROUPS parameter.
-l,--lock
Lock the user account. The user won't be able to log in.
-u,--unlock
Unlock the user account.
-Z,--selinux-user SELINUX_USER
The SELinux user for the user's login.
-h,--help
Display help message and exit.
THE LOCAL DOMAIN
In order to function correctly, a domain with "id_provider=local" must be created and the SSSD must be running.
The administrator might want to use the SSSD local users instead of traditional UNIX users in cases where the group nesting (see
sss_groupadd(8)) is needed. The local users are also useful for testing and development of the SSSD without having to deploy a full remote
server. The sss_user* and sss_group* tools use a local LDB storage to store users and groups.
SEE ALSO
sss_groupadd(8), sss_groupdel(8), sss_groupmod(8), sss_groupshow(8), sss_useradd(8), sss_userdel(8).
AUTHORS
The SSSD upstream - http://fedorahosted.org/sssd
SSSD
03/04/2013 SSS_USERMOD(8)