Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Removing a user that doesnt exist from a group Post 302542606 by rethink on Thursday 28th of July 2011 05:33:10 AM
Old 07-28-2011
thanks all, the gpasswd command worked perfectly and methyl, thanks, you are right i should run pwck and grpck before hand, however you are wrong about the 'usermod -G' command above as that works perfectly well. I believe -G is for suplimentary groups not primary so all is good. The man page confirms this ...


Code:
 
-G, --groups GROUP1[,GROUP2,...[,GROUPN]]]
  A list of supplementary groups which the user is also a member of. Each group is separated from the next by a comma .............

 

10 More Discussions You Might Find Interesting

1. Solaris

Removing the only secodnary group existed from a user on SUN or HP

I want to know the command line to removed the only secondary group existed from a user on an HP/SUN. :confused: (1 Reply)
Discussion started by: jquizon62
1 Replies

2. UNIX for Advanced & Expert Users

Validate if user and group exist

I'm kinda new to unix programming so bear with me... I'm running a script prompting a user for an existing user and group and want to be able to validate if they valid. Is there any code available? Any help or push in the right direction would help. Thank you, (2 Replies)
Discussion started by: thedon
2 Replies

3. Red Hat

trying to use arp command... it doesnt exist

im trying to get an ARP readout using the command 'arp -a'... but the command doesnt exist in Fedora Core 6 - IPv6.... is there an equivalent command? (4 Replies)
Discussion started by: HMSS013
4 Replies

4. Shell Programming and Scripting

Check file and if it doesnt exist , exit script

Hi, Another problem, here is my code #!/bin/sh dir='/opt/apps/script/CSV' datadir='/opt/apps/script/data' while : ; do ls -1rt $dir/*.csv > /dev/null 2>&1 if ;then cp $datadir/weekly.txt $dir/weekly.csv else exit 0 fi done (10 Replies)
Discussion started by: tententen
10 Replies

5. Shell Programming and Scripting

Removing Lines if value exist in first file

I tried a few ways to resolve this using a bash script w/ a loop, no luck. File1: roughly 6,000 account numbers such as: 1111 1512 1113 123 I also have a dozen or so csv files, w/ the account number in the 4th field. What I would like to do is remove all lines if the... (19 Replies)
Discussion started by: svn
19 Replies

6. Shell Programming and Scripting

Group Exist Scripting

Hey People, I've got a question! How can i write a function in a script which is looking for if a group exist and if not, that the group "users" is the standard group..I know that i have to use "grep" und "if-else"..I will be very happy for answers ;) Greetz Ali (2 Replies)
Discussion started by: AliC
2 Replies

7. Shell Programming and Scripting

Code to remove files when corresponding file doesnt exist isnt working.

I am trying to add some code to the begging of a script so that it will remove all the .transcript files, when their is no coressponding .wav file. But it doesnt work. This is the code I have added: for transcriptfile in `$voicemaildir/*.transcript`; do wavfile=`echo $transcriptfile | cut -d'.'... (2 Replies)
Discussion started by: ghurty
2 Replies

8. Red Hat

Removing LVM Volume Group that doesn't exist anymore

Our SAN administrator decided to unpresent then destroy LUN's we were actively using as a volume group (all PV's in said volume group). Now every time I do a pvscan or whatever it complains about I/O errors trying to access those PV's. How do I get it to forget the VG existed completely? vgreduce... (7 Replies)
Discussion started by: thmnetwork
7 Replies

9. Red Hat

User is a Part of a Group But Group Details Do Not Show the User

Hi, In the following output you can see the the user "richard" is a member on the team/group "developers": # id richard uid=10247(richard) gid=100361(developers) groups=100361(developers),10053(testers) but in the following details of the said group (developers), the said user... (3 Replies)
Discussion started by: indiansoil
3 Replies

10. Homework & Coursework Questions

Group Doesn't Exist

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: I'm able to create a group but when I'm trying to delete the group it keeps stating Group Doesn't Exist. I know... (2 Replies)
Discussion started by: GoBoyGo
2 Replies
hosts.equiv(5)							File Formats Manual						    hosts.equiv(5)

Name
       hosts.equiv - list of trusted hosts

Description
       The file resides in the directory and contains a list of trusted hosts.	When an or request from a host listed in the file is made, and the
       initiator of the request has an entry in further validity checking is not required.  Thus, does not prompt for a  password,  and  completes
       successfully.  When a remote user is in the local file, that user is defined as equivalenced to a local user with the same user ID.

       The format of is a list of names, as in:
       host1
       -host2
       +@group1
       -@group2

       A  line	consisting  of a host name means that anyone logging in from that host is trusted.  A line consisting of a host name preceded by -
       means that anyone logging in from that host is not trusted.  A line consisting of a single + means that all hosts are trusted.	Placing  a
       line consisting of a single + in your file poses substantial security risks and is not recommended.

       The  +@ and -@ syntax are specific to Yellow Pages (YP).  A line consisting of +@group means that all hosts in that network group (which is
       served by YP) are trusted.  A line consisting of -@group means that hosts in that network group (which is served by YP)	are  not  trusted.
       Programs  scan  the  file sequentially and stop when they encounter the appropriate entry (either positive for host name and +@ entries, or
       negative for -@ entries).

       The file has the same format as the file.  When a user executes or the file from that user's home directory is concatenated onto  the  file
       for  permission	checking.  The host names listed in the and files may optionally contain the local BIND domain name.  For more information
       on BIND, see the Guide to the BIND/Hesiod Service.  If a user is excluded by a minus entry from but included in	that  user  is	considered
       trusted.  In the special case when the user is root, only the file is checked.

       It  is  possible to have two entries on a single line.  Separate the entires with a space.  If the remote host is equivalenced by the first
       entry, the user named by the second entry is allowed to specify any name to the option (provided that name is in the file).  For example:
       suez john
       This entry allows John to log in from suez.  The normal use would be to put this entry in the file in the home directory for  bill.   Then,
       John can log in as bill when coming from suez without having to supply a password.  The second entry can be a netgroup.	For example:
       +@group1 +@group2
       This entry allows any user in group2 coming from a host in group1 to log in as anyone.

Files
       /var/yp/domain/netgroup
       /var/yp/domain/netgroup.byuser
       /var/yp/domain/netgroup.byhost

See Also
       rlogin(1c), rsh(1c), netgroup(5yp)
       Guide to the BIND/Hesiod Service
       Guide to the Yellow Pages Service

																    hosts.equiv(5)
All times are GMT -4. The time now is 11:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy