Monday, February 18, 2013

Linux User and Group Administration Commands:

1) How to add user in linux.

The syntax is as follows:
# adduser username
# useradd username

2) How to delete user in linux.

#userdel username

3) How to set password for a user in linux.

#passwd username

4) How to lock user account in Linux.

The syntax is as follows:
#passwd -l {username}

5) How to unlock user account in Linux.

#passwd -u {username}

6) How to create group in linux.

The syntax is as follows:
# groupadd  group name

7)How to add user to group
# useradd -G group name  username

8) What is UID for root user.

#  id root
uid=0(root) gid=0(root) groups=0(root)

9) How to check os version in linux.

# cat /etc/redhat-release
#cat /proc/version

10) How to check free disk space in linux.
#df -h

No comments:

Post a Comment