Visit Our UNIX and Linux User Community


Change of group to different users


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Change of group to different users
# 1  
Old 08-23-2009
Change of group to different users

Need to change the chgrp for different uses

Code:
d---rwx--t    3 root  764      4096 Mar 16  2007 algavi
d---rwx--t    6 root 2857      4096 Jul 16 11:28 alharki
d---rwx--t    5 root 2739      4096 Oct 14  2008 alpen
d---rwx--t    5 root  546      4096 Mar 16  2007 alvarez
d---rwx--t    3 root 2689      4096 Sep 29  2008 amerac
d---rwx--t    3 root 2503      4096 Nov  1  2008 amplifiedstatic
d---rwx--t    3 root  501      4096 Mar 16  2007 anacorte
d---rwx--t    3 root 3062      4096 Feb  6  2009 anbalayam
d---rwx--t    5 root 3028      4096 Feb  1  2009 anerley

The chgrp from numbers to changed to folder names as given.
for eg:
d---rwx--t 3 root 764 4096 Mar 16 2007 algavi
this need to be changed to
d---rwx--t 3 root algavi 4096 Mar 16 2007 algavi

Last edited by vgersh99; 08-23-2009 at 08:09 PM.. Reason: code tags, PLEASE!
# 2  
Old 08-23-2009
Hi,

since the number of groups in Unix is limited, this doesnt seem to be best idea ?
I have never seen such a weird setup anyways ... why are all these directories owned by root and not by the corresponding users - and the users maybe in groups according to their entities ?

Rgds
zxmaus
# 3  
Old 08-23-2009
To keep the forums high quality for all users, please take the time to format your posts correctly.

First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags [code] and [/code] by hand.)

Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.

Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.

Thank You.

The UNIX and Linux Forums

Previous Thread | Next Thread
Test Your Knowledge in Computers #481
Difficulty: Medium
Generally speaking, programs do not start out as source code.
True or False?

10 More Discussions You Might Find Interesting

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

2. Solaris

To restrict the users not to change the passwords for NIS users

Hi All, How to restrict the NIS users not to change their passwords in for NIS users?? and my NIS user is unable to login to at client location what could be the problem for this ? Any body can help me. Thanks in advance. (1 Reply)
Discussion started by: Sharath Kumar
1 Replies

3. Shell Programming and Scripting

users per group

hi guys I am trying to display a list of groups and the respective users: Group1 : user1 user2 user3 .... the closest thing I get is echo " "; echo "Group Users "; echo " "; cat /etc/group |grep | grep -v nfswhich I really don't since I want to remove the other stuff like x : and... (4 Replies)
Discussion started by: karlochacon
4 Replies

4. Programming

to obtain users of each group in c

Hello They have ordered to me that makes several small utilities in C/C++ for the servants, among them a small program in C/C++ to generate a file HTML with the groups of that servant and in addition that is the corresponding users of that group. For example of a group: Group: Sys Members:... (2 Replies)
Discussion started by: cybermeis
2 Replies

5. Shell Programming and Scripting

Diffferentiate group from users

Im trying to put all the groups in into a variable called $GROUP, however in /etc/group there are also lotsa users. And the GID of group can differ as it can be set, this there is no specific range, how can i put all the names of the groups into that variable? (3 Replies)
Discussion started by: dplate07
3 Replies

6. Solaris

How can i allow only a group of users in NIS?

Hello experts. I am using Solaris10. How can i allow a group of users, remaining should be deny. Thanx in advance. (9 Replies)
Discussion started by: younus_syed
9 Replies

7. Shell Programming and Scripting

SSH for a group of users ?

Hi, Can any one tell me is it possible to setup private key public key pairing(SSH ) for a group of users , instead of setting it up for individual users ? Eg: Say i have 3 users A,B and C and i want the users to connect to SERVER1. instead of generating public private keys for each user , is... (3 Replies)
Discussion started by: deepusunil
3 Replies

8. AIX

Max users in a group ?

Hi All, Does anyone know if there is a maximum limit to the number of users that can be assigned to a group. I currently have on a production server 900+ users in 1 group. I know some of these users are no longer valid as we only have 500 employees and not all employees use this application. ... (4 Replies)
Discussion started by: anmiller
4 Replies

9. UNIX for Advanced & Expert Users

Change a users primary group after login

When users login, they are directed to menu (aix script). The menu enables the user to choose an environment to work in. Each environment has a different group id. When a user chooses a menu option, I want to change his primary group to that specific environment's group id. Is this at all possible... (3 Replies)
Discussion started by: terrym
3 Replies

10. UNIX for Dummies Questions & Answers

Adding users to /etc/group

I'm using SAM to add users on an HP and they're adding fine. But in /etc/group it only lists the group names. It's not adding the users in there. Is there a way to have them put in there without going into SAM and modifying the group and adding them? I guess what I want to happen is when I add... (1 Reply)
Discussion started by: golfhakker
1 Replies

Featured Tech Videos