Showing posts with label creating user. Show all posts
Showing posts with label creating user. Show all posts

Wednesday, November 2, 2011

User and Group administration in AIX


User creation

Syntax:

mkuser

Example:

mkuser id=234 pgrp=aix su=true home=/home/abc gecos=”aix admin” abc

The same can be done by using smitty.

Changing user attributes

Syntax:

chuser

Example:

chuser gecos=”AIX team member” abc


Listing user attributes

Syntax:

lsuser (or) lsuser –f

Example:

lsuser –f abc

It will show you all the attributes of the user abc.

If you want to compare the attributes of two users, use the flag –c instead of –f followed by the user names.

lsuser –c abc, xyz

Changing shell of the user

Syntax:

chsh

Example:

chsh abc

It will show you the list of available shells. Type Yes then give the new shell.

Setting password to the username

Syntax:

passwd

Example:

passwd abc
Changing password for “abc”
abc’s new password:
Enter the new password again:

We can also use the command pwdadm to change the password.

Example: pwdadm

Note that the syntax is same as passwd command.

Deleting users

Syntax:

rmuser –p

Example:

rmuser –p abc

It will remove the user id from the server along with the password information.

Similarly general commands used for group activities are as follows.

To create a group

mkgroup

Example: mkgroup aixadmin

To change group properties

chgroup 

Example: chgroup users=sam,ram aixadmin

To delete a group

rmgroup

We can use –p flag to remove the key store values of a group and –R to remove the ldap information.

Example: rmgroup aixadmin

For detailed information, please go through the below link.






Tuesday, May 5, 2009

LVM and User administration commands on aix

LVM commands

1. Adding LUN.

#extendvg vg name pv name

2. creating Volume Group.

#mkvg –y vg name physical volume

3. creating Logical volume.

#mklv –y lv name -t file system volume group number of LP physical volume


4. creating file system.

#crfs –v file system type -g volume group -a size= size in M -m mt point

5. increasing & Decreasing file system.

#chfs -a size= +4194304 MOUNT_POINT

#chfs -a size=-16M MOUNT POINT

6. file integrating checking.

#fsck file

7. mount /umount the file systems.

# mount /dev/fslv02 /test
# umount /test

8. File permission /ownership changes.

#chmod u=permission,g=permission,o=permission file
#chown –R owner:group file

9. Rootvg mirroring

#mirrorvg rootvg new and empty pv

OR

#mklvcopy lvname copy pv


User Administration Commands

1) Create the user

To create the user account with the default values in /usr/lib/security/mkuser.default

#mkuser username

To create the user account as an administrator

#mkuser –a username

2) Remove the user

To remove the user from the local system

#rmuser username

To remove the user with its attributes including user authentication information.,

#rmuser –p username

3) To reset a password

#passwd username

4) To unlock the user Id

#chuser “account_locked=false” userid

5) To set a non expiry password for the user

#chsec –f /etc/security/user –a maxage=0

6) To change the characteristics of the user

#chuser –a attribute=value