Sponsored Content
Full Discussion: Creating groups and users
Top Forums UNIX for Advanced & Expert Users Creating groups and users Post 302697281 by Dorothy on Thursday 6th of September 2012 11:41:55 AM
Old 09-06-2012
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, is there any better way to do this?
 

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. UNIX for Dummies Questions & Answers

Finding out all users and their UNIX groups??

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

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

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. 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

8. Shell Programming and Scripting

users and groups /etc/group parsing

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

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. HP-UX

Creating user groups that are persistent

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
pwck(8) 						      System Manager's Manual							   pwck(8)

NAME
pwck, grpck - Checks the password and group files for inconsistencies SYNOPSIS
pwck [-admNs] [file] grpck [-mNp] [file] FLAGS
Causes both pwck and grpck to additionally check the NIS database entries using the same consistency tests. Users that are defined in the local password or group file without the "+" at the start of the name field are flagged as duplicate entries. pwck Inhibits the running of the /tcb/bin/authck -p command on a system running Enhanced Security. Prevents pwck from checking for the presence of the user's login directory. Directs pwck to check for mixed case usernames. Causes pwck to check for the presence of the optional shell field for each entry. grck If there are no members, causes grpck to display a message indicating the listed group has no members. Directs grpck to not check for a users' existence in the password database (local or NIS). DESCRIPTION
The pwck command scans the /etc/passwd file, or the named file, and writes to standard out any inconsistencies. The scan checks the number of fields, login name, user ID, group ID, and existence of a login directory and optional program name. The grpck command scans the /etc/group file, or the named file, and writes to standard out any inconsistencies. The scan checks the number of fields, group name, group ID, and whether all login names appear in the password file. EXAMPLES
To verify the password information in the /etc/passwd file for consistency, enter: pwck To verify the password information in the /etc/passwd file and the NIS database for consistency without checking each users login directory validity, enter: pwck -Nd To verify the group information in the /etc/group file and the NIS database for consistency, enter: grpck -N FILES
Specifies the command path Specifies the command path Contains user information Contains group information RELATED INFORMATION
Commands: adduser(8), authck(8), groups(1), passwd(1), vipw(8) Files: passwd(4), group(4), ypfiles(4) delim off pwck(8)
All times are GMT -4. The time now is 08:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy