Author Topic: User, group, permisson management on RHEL+Centos +Linux (BASIC)  (Read 1557 times)

Offline rubel

  • Administrator
  • Full Member
  • *****
  • Posts: 140
    • View Profile
Training User, group, permisson management on RHEL+Centos +Linux (BASIC)

After installation of RHEL 6.4 .Now I will  discuss Basic Permission Management. Lets start
(1)User add
(2) Group Add (Primary & Secondary)
(3) Owener Ship Change
(4)Access Control on (Permission Management)
Ok ,I will start now.
Open your favorite text editor ( I using here terminal)
[root@server1 ~]# useradd user1
[root@server1 ~]# useradd user2
[root@server1 ~]# useradd user3
[root@server1 ~]# useradd user4
[root@server1 ~]# passwd user1;
Changing password for user user1.
New password:
BAD PASSWORD: it is too simplistic/systematic
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.
[root@server1 ~]# passwd user2
Changing password for user user2.
New password:
BAD PASSWORD: it is too simplistic/systematic
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.
[root@server1 ~]# passwd user3
Changing password for user user3.
New password:
BAD PASSWORD: it is too simplistic/systematic
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.
[root@server1 ~]# passwd user4
Changing password for user user4.
New password:
BAD PASSWORD: it is too simplistic/systematic
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.
Show Primary Group fo user1-user4
[root@server1 ~]# cat /etc/group
----------------------------
user1:x:506:
user2:x:507:
user3:x:508:
user4:x:509:
-----------------------------
[root@server1 ~]# groupadd technologybd.net
[root@server1 ~]# cat /etc/group
------------------------------------------
user1:x:506:
user2:x:507:
user3:x:508:
user4:x:509:
technologybd.net:x:510:
-------------------------------------------
*************** user1,user2,user3 join technologybd.net group ************
[root@server1 ~]# gpasswd -M user1,user2,user3 technologybd.net
[root@server1 ~]# cat /etc/group
---------------------------------------------------------------
user1:x:506:
user2:x:507:
user3:x:508:
user4:x:509:
technologybd.net:x:510:user1,user2,user3
----------------------------------------------------------------
*************** Show Encrypted password fo user1-user4 ***************************
[root@server1 ~]# cat /etc/shadow
----------------------------------------------------------------------------------------------------------------------------------------
user1:$6$iaBxDhfW$WOikzJWbKIa149CRnO7zASun1wSuBsvcXjEtHI88CvfubOwjXkzzLCLi70ysjRDrjyMA5qXndpsjfZivRsgfn1:15824:0:99999:7:::
user2:$6$Yd/sPAOc$g2NIj38DhZ/4rjMmbcsgPwIYdC5Cot.fVA.qWen9uEOa1.JaTV4HKpcZL7VX1/p0Wq9KX9i/h5xaEAH15iE7l1:15824:0:99999:7:::
user3:$6$QB9PyTpC$xdQI/ofRcOquMCmxr0OsXnmpTizCl0mf0WYAuHfkYsk20Jn2tXVLHcg.suuv.Wn4pCpkI94zX5UZJ8hklrAEw0:15824:0:99999:7:::
user4:$6$vaZwW2jq$udg.x8yUB9qiXGifkYC5G0Phv0.Jdqdb28wCR65aH08lAN7s7aqIqlVweK62cUYQnxGHjZmXp7O9oqfFg78Ju/:15824:0:99999:7:::
----------------------------------------------------------------------------------------------------------------------------------------
[root@server1 ~]# mkdir /Bangladesh
[root@server1 ~]# chgrp technologybd.net /Bangladesh
[root@server1 ~]# chmod 070 /Bangladesh/
[root@server1 ~]# su user1
[user1@server1 root]$ cd
[user1@server1 ~]$ cd /Bangladesh/
[user1@server1 Bangladesh]$ touch file_by_user1
[user1@server1 Bangladesh]$ exit
exit
[root@server1 ~]# su user2
[user2@server1 root]$ cd
[user2@server1 ~]$ cd /Bangladesh/
[user2@server1 Bangladesh]$ ls
file_by_user1
[user2@server1 Bangladesh]$ touch file_by_user2
[user2@server1 Bangladesh]$ exit
exit
[root@server1 ~]# su user3
[user3@server1 root]$ cd
[user3@server1 ~]$ cd /Bangladesh/
[user3@server1 Bangladesh]$ ls
file_by_user1 file_by_user2
[user3@server1 Bangladesh]$ touch file_by_user3
[user3@server1 Bangladesh]$ ls
file_by_user1 file_by_user2 file_by_user3
[user3@server1 Bangladesh]$ exit
exit
[root@server1 ~]# su user4
[user4@server1 root]$ cd
[user4@server1 ~]$ cd /Bangladesh/
bash: cd: /Bangladesh/: Permission denied
Read More: http://adfoc.us/15080724974220

Written by
Md.Murad Hosen
+8801827517700
web:www.technologybd.net
skype:muradbd4g
facebook:www.facebook.com/murad.bspi
Rafiqul Alam Rubel
Senior Assistant Director(IT)
Special Assistant to Chairman, BOT
Daffodil International University
Cell :+88 01713493130 or +8801811458809