Sponsored Content
Full Discussion: changing group ID
Special Forums Hardware Filesystems, Disks and Memory changing group ID Post 302072515 by RTM on Wednesday 3rd of May 2006 04:01:33 PM
Old 05-03-2006
Check the man page for the find command - there should be an option for finding files that belong to a certain group:

Example: find /some-starting-directory -group 23 -exec chgrp 123 {} \;
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Changing the Effective Group ID

Here is my situation. On a RedHat 7.3 box, I have a user named jody. When I log in with jody and type in "id", I get the expected output: uid=1(jody) gid=1(jody) groups=1(jody), 510(test) However, I cannot figure which "id" option allows me to change the effective gid. I tried the options... (2 Replies)
Discussion started by: Jody
2 Replies

2. UNIX for Advanced & Expert Users

File group ownership changing automatically

Hi everyone, Need help with an issue. The group ownership of files on my Solaris system is getting changed automatically. Could someone tell me the reason why? And how could I correct it? One more info- everytime the ownership changes, it changes to "x". Thanks :confused: (1 Reply)
Discussion started by: top_gun
1 Replies

3. Shell Programming and Scripting

Changing userID and Changing group and GID

Hello, I want to write a ksh script about changing UID and changing group with GID. There are multiple servers i want to perform that job. linux1 linux2 linux3 linux4 linux5 ...... . . . . . 1.) How can i enter "password" in script rather asking me? I was trying this... ssh... (2 Replies)
Discussion started by: deal732
2 Replies

4. Solaris

Changing root group to group from other

Does any one know if changing root's group from “other” to “root” will cause any problems on a running system. Thanks (4 Replies)
Discussion started by: mjkroner
4 Replies

5. UNIX for Dummies Questions & Answers

regarding changing ownership and group

i am able to change the mode using chmod and able to change permission. but i am not able to change group and ownership. getting as invalid can any one help me regarding this . (4 Replies)
Discussion started by: satheeshkr_cse
4 Replies

6. UNIX for Dummies Questions & Answers

Changing rights without touching user and group?

Hello, I have a small problem and would be happy if someone could help me to find a solution: A machine ("server") makes backups of different computers ("clients") using rsync. Users and groups are keept, so that it's possible to copy them back to the client if required. The number of groups... (3 Replies)
Discussion started by: tracer
3 Replies

7. Shell Programming and Scripting

need a one liner to grep a group info from /etc/group and use that result to search passwd file

/etc/group tiadm::345:mk789,po312,jo343,ju454,ko453,yx879,iy345,hn453 bin::2:root,daemon sys::3:root,bin,adm adm::4:root,daemon uucp::5:root /etc/passwd mk789:x:234:1::/export/home/dummy:/bin/sh po312:x:234:1::/export/home/dummy:/bin/sh ju454:x:234:1::/export/home/dummy:/bin/sh... (6 Replies)
Discussion started by: chidori
6 Replies

8. Shell Programming and Scripting

perl :Changing script to only find the group

Hi scripting guru's I found this script on IBM's website and it seems to be really good only thing it gives off more info than i need. I was wondering if someone could help me modify it to only find a group instead of every user. (group is support) I believe i know how to add the line so it... (2 Replies)
Discussion started by: vpundit
2 Replies

9. Red Hat

Can't chgrp. Error - chgrp: changing group of `<file>': Invalid argument

I found that I cannot chgrp for some reason with error: chgrp: changing group of `<file>': Invalid argument This happens on all NFS mounted disks on client machines. We use AD (not my call) for authentication and it also provides groups. We have a NFS server running Scientific Linux 6.3... (1 Reply)
Discussion started by: venmx
1 Replies
groupadd(8)						      System Manager's Manual						       groupadd(8)

NAME
groupadd - Adds a new group definition SYNOPSIS
/usr/sbin/groupadd [-g gid [-o]] [-P] [-x extended_option] group_name OPTIONS
Specifies the group identifier (GID) of the new group being added. The GID must be a non-negative decimal integer. Allows a group identi- fication (GID) number to be duplicated (non-unique). This option can be used only with the -g option. Creates a PC group only. The fol- lowing extended_option attributes are available. The PC attributes will only be applicable if the Advanced Server for UNIX (ASU) is config- ured. The extended_option attributes can be specified as a space-delimited list after a single -x option. Indicates that the group is distributed. The value of the distributed=n attribute can be 0 or 1. If set to 0, the group is added to the local system. If set to 1, the group is added to the NIS master database on the running system. When this attribute is set, the local attribute is automatically set to the opposite value. Indicates that the group is local. The value of the local=n attribute can be 0 or 1. If set to 1, the group is added to the local database. If set to 0, the group information is added to the NIS master database. When this attribute is set, the distributed attribute is automatically set to the opposite value. A comma-delimited list of members that will be added to the UNIX user's group. You can specify the user (login) name or the account UID. Specifies a text string that provides a description of the PC group. Specifies a comma delimited list of PC users to be added to the current list of members of a PC group. Note that this adds, but does not replace mem- bers. Specifies the name of the new group. The group name can be any printable characters, with the exception of the colon (:) and new- line ( ) characters. DESCRIPTION
The groupadd command is part of a set of command-line interfaces (CLI) that are used to create and administer user groups on the system. When the Advanced Server for UNIX (ASU) is installed and running, the groupadd command can also be used to administer PC groups for users who are also holders of Windows NT domain accounts. Accounts can also be created with the /usr/bin/X11/dxaccounts graphical user interface (GUI), although the extended options are only available from the CLI utilities such as useradd and groupmod. Different options are available depending on how the local system is configured: In the default UNIX environment, user account management is compliant with the IEEE POSIX Draft P13873.3 standard. The CLI is backwards-compatible, so all existing local scripts will function. However, you should consider testing your account management scripts before use. The groupadd command lets the system administrator create new groups on the system, by specifying the group name and GID. When the GID is not specified (with the -g option), the GID defaults to the next available (unique) number. The -x option lets the system administrator specify whether the new group is local or distributed over a network. If this option is not specified on the command line, the system adds the new group to the appropriate database as specified by the system defaults. The default behavior on the system for the groupadd command is distributed=0 and local=1. With these values, the system adds the group to the local database by default. Setting the distributed= and local= attributes to the same value (for example, distributed=0 and local=0) produces an error. You must have superuser privilege to execute this command. RESTRICTIONS
You cannot specify more than 255 characters on a single command line. However, lines can be split to an appropriate length. If you try and enter too many new groups, the group file may be corrupted. The pc_synchronize default value is not used for groupadd, groupmod, and groupdel. UNIX and PC groups cannot be synchronized and therefore must be created separately. Use the command groupadd -P xdomain to create a PC group named xdomain. Then, use the command groupadd xdomain to create a UNIX group named xdomain. EXIT STATUS
The groupadd command exits with one of the following values: Success. Failure. Warning. EXAMPLES
The following example adds the group, newgroup, to the group database with a system-provided GID: % groupadd newgroup The following example adds the group, newgroup, to the group database with a GID of 451: % groupadd -g 451 newgroup The following example adds the group, new- group, to the NIS master database % groupadd -x distributed=1 newgroup The following example adds the PC group, projectX with members JoeMc and HiteshC: % groupadd -x members=JoeMc,HiteshC, projectX The following example adds the PC group, newgroup and provides a description field "common project group": % groupadd -P -x pc_group_description="common project group" projectX FILES
The groupadd command operates on files for the specific level of system security. SEE ALSO
Commands: groupdel(8), groupmod(8), useradd(8), userdel(8), usermod(8) System Administration Security Advanced Server for UNIX administration and configuration documents. groupadd(8)
All times are GMT -4. The time now is 07:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy