VIEW Video : Link
command :
#root
#password root
#cat > abc.txt
#testing > Ctrl+D save..
#ll
you can see :
-rw-r--r-- .......
- ខាងមុខមានន័យថា file type
rwx : ជា user
r-x : ជា Group
r-x : Other
r = read = 4
w = write = 2
x = execute = 1
- = disable = 0
#who : show user sign in
#useradd sok : create user sok
#passwd Sok : add password for user sok
#password again
#logout
login user sok
#password:
#pwd : view user
#logout
#usermod -l sao sok : rename user
#cat /etc/passwd : check កន្លែងផ្ទុក user and password
#userdel soa : Delete only user account of soa
#ll /home/
#useradd dara
#ll /home
#cat /etx/passwd
#userdel -r dara : delete all home user profile
#ll /home : check home user dara delete yet
#cat /etc/passwd : view user dara delete yet..
#groupadd IT : create group
#groupmod -n Accounting IT : rename : IT to accounting
#cat /etc/group : view containt
#groupdel Acccounting : delete group ..
#cat /etc/group : view group
#groupadd IT
#groupadd Finance
#cat etc/gr
#userdd -g IT vuthy : add user vuthy to group IT for user new
#cat /etc/passwd : view user old
#useradd leng
#cat /etc/passwd
#usermod -g IT leng : for user create before and add to group..
#groups leng : view user in group
#cat /etc/group |grep IT : find group ID
#group vuthy /etc/passwd : find profile user vuthy
#ll abc.txt : view file permission, full permission = r+w+x
#chmod u=rwx,g=rw,o=rw abc.txt
#ll abc.txt : view permission
#chmode 755 abc.txt : set permission use number
#chmode 777 abc.txt : full permission use number
#chmode chmod u=rw abc : overwrite permission
#ll abc.txt
#chmod g-w abc.txt :
#ll abc.txt
#chmod o-rx abc.txt : remove permission
#ll abc.txt : owner file
#cat /etc/passwd
#cat /etc/group
#ll abc.txt
#cat /etc/passwd |grep sok
#useradd sok
#useradd -g sok sok : សំរាប់ពេលដែល ធ្លាប់លុបចោលម្តងហើយ create មកវិញ
#grep sok /etc/passwd
#ll abc.txt
#chown sok abc.txt : change user owner
#ll abc.txt
#chown dara abc.txt : change permission user
#grep Finance /etc/group
#chgrp Finance abc.txt : change permission group
#ll abc.txt : user root can't have permission before change permission group and owner
EmoticonEmoticon