Monday, November 30, 2009

User and Group Administration - Part 2

GROUP ADMINISTRATION


Few Restrictions on the Group Name:

1. Group names cannot start with the below signs:
  • Dash or minus sign (-).
  • Plus sign (+)
  • At symbol (@)
  • Tilde (~)
2. Groups cannot be named ALL or default, as these names are reserved for the AIX OS.
 
3. Group names cannot include :

  • Colon (:)  
  • Quotation marks—single or double (' or ")
  • Pound or hash sign (#)
  • Comma (,)
  • Equal sign (=)
  • Slashes—back or forward (\ or /)
  • Question mark (?)
  • Back quote or tick (`)
  • White space (space or tab)
  • New-line characters
4.  Group names can have max. 8 characters in AIX V 5.2 or earlier. Starting with AIX 5.3, you can have a
max. of 255 characters.



Now let us look at the configuration files for groups.


/etc/group :

This file contains the basic group configuration details in the following format.

Group Name : Password Flag : GID : User(s)

where
Password Flag - This field is not used in AIX.
GID                 - Group ID is the unique identification number for every group. 0 is the gid for system group.
User(s)             - List of users belonging to the group

/etc/security/group :

This file contains the extended attribtues for the groups.
Here are the parameters used in this file.

adms  - List of users with admin rights to ths group
admin - If set to true, this group will have administrative rights.

There are 4 main commands used in the administration of group :

mkgroup - Add a group
chgroup - Change an attribtue of a group
lsgroup  - List the attribtues of a group
rmgroup - Remove a group

These words can also be used as fastpaths for smitty.

For example, # smitty mkgroup will open a form to create a group.

For doing the whole group administration, you can use

# smitty group and go thru the menu items for various operations.


Now let us see the commands to administrate groups ...

1. To create a group called dba :

# mkgroup dba

2. To create a admin group called admin1 :

# mkgroup -a admin1

3. To create dba group and add jack as the admin :

# mkgroup adms=jack dba

4. To change the members of dba group, you can use any of the below commands :

# chgroup users=jack,tom,michelle dba

# chgrpmem dba

# chgrpmem -m + raja dba

5. To remove the membership of a user from the dba group :

# chgrpmem -m - jack dba

6. To add a user as admin for the dba group :

# chgrpmem -a + raja dba

7. To remove the group administrator :

# chgrpmem -a - raja dba

8. To list the attributes of a group :

# lsgroup dba

9. To remove a group from the system :

# rmgroup test

8 comments:

Vinay Reddy said...

hi iam vinay frm hyd,iam reading u r blog regularly.really u r blog is ultimate and very helpfull to me,plz provide some real time synario on aix (LVM)and lpar vio do the needfull

Raja said...

Thanks for your comments.
I'm making videos on my home server. Its bit old so I can't make lpar and vio videos out of that. If I get a chance of making a video on any non-official servers, I'll post them here.

suraj naidu said...

Hi Raja,

I have a query,
I have one VG datavg in tat PP size is 0 at present. I have added the new PV using extenvg command it got extended now the problem is M not able to extend the FS using chfs command error is noted below. And the hard disk is stripped.

0516-1034 mklv: Not enough physical partitions in physical volume hdisk2.
0516-822 mklv: Unable to create logical volume

Please help me on this.

Anonymous said...

Hi Raja your blog is very helpful.
i want to do carrier in ibm aix.please suggest me.
i am working as window system administrator.


kindly reply.

Kiran M Rajanna said...

@Suraj Naidu - After you have added the new disk you have to change the VG to see the increased LUN

1) Run cfgmgr
2) Run "bootinfo -s to see the disk size
3) Run "chvg -g to reflect the increased LUN
4) Run "lsvg to see the increased PP's

You should be good to go.
Before creating logical volumes dont forget to run "chlv -x 1024 /

Ramya said...

Hello raja,
I'm planning to learn AIX i have listened to your videos on youtube they are very helpful to me.. do you offer online training on AIx by any chance. please let me know thanks

Ramya said...

Hello raja,
I'm planning to learn AIX i have listened to your videos on youtube they are very helpful to me.. do you offer online training on AIx by any chance. please let me know thanks

Raja said...

Hi Ramya,

Thanks for watching my videos.
I do not offer any training. But there are several websites do that which you may try.