How to create user and group in linux redhat server
hii guy today we will learn and discuss that how can we create group and user in linux server and also learn how to provide different -2 permission every user or group on specify file .For example we look any company or organisation employ schedule in some person can read only schedule .but some person can manipulation in schedule .so we will learn how to do it basically like this work depend on read ,write. execute permission .
so let we start create user in linux redhat server
[root@localhost ~]# useradd joon [root@localhost ~]# passwd joon Changing password for user joon. New UNIX password:12345 BAD PASSWORD: it is too short Retype new UNIX password:12345 [root@localhost ~]# useradd robet [root@localhost ~]# passwd -d robet Removing password for user robet. passwd: Success [root@localhost ~]# userdd peetr -bash: userdd: command not found [root@localhost ~]# useradd peetr [root@localhost ~]# passwd -d peetr Removing password for user peetr. passwd: Success [root@localhost ~]# useradd jully [root@localhost ~]# passwd -d jully Removing password for user jully. passwd: Success
we can remove user
[root@localhost ~]# userdel -r joon(we can remove all user like this
how to create group and user add in group
[root@localhost ~]# groupadd demo [root@localhost ~]# usermod -G demo robet [root@localhost ~]# usermod -G demo peetr [root@localhost ~]# usermod -G demo jully ( note check group)[root@localhost ~]# cat /etc/group
how can we provide permission in group and user ,other

here look we have u1,u2,u3, user and HELLO group in jully robut brad user. And file owner (user) joon .we can look through cmd(command) that how we provide each user and group read write execution permission(here we need some new user diagram according )
- [root@localhost ~]# useradd u1 [root@localhost ~]# passwd -d u1 Removing password for user u1. passwd: Success [root@localhost ~]# useradd u2 [root@localhost ~]# passwd -d u2 Removing password for user u2. passwd: Success [root@localhost ~]# useradd u3 [root@localhost ~]# passwd -d u3 Removing password for user u3. passwd: Success [root@localhost ~]# groupadd hello [root@localhost ~]# usermod -G hello jully [root@localhost ~]# useradd robut [root@localhost ~]# passwd -d robut Removing password for user robut. passwd: Success [root@localhost ~]# usermod -g hello robut [root@localhost ~]# chown joon data [root@localhost ~]# chgrp hello data [root@localhost ~]# setfacl -M g:rw,u=rwx,o=r data [root@localhost ~]# ls -l drwxr-xr-x 2 joon hello 4096 Dec 13 00:36 data
thank you
by – vishnu sharma
