1.setenforce 1
#vim /etc/selinux/config 進入改為Enforcing (強制)
2.
# cd /etc/yum.repos.d/
# vim server repo
[base]
name=Server
baseurl=http://172.24.11.254/pub/x86_64/Server
enable=1
gpgcheck=0
# yum clean all 及 yum makecache
-------------------------------------------------------------
3.
df -h
#lvextend -L 200M /dev/rhel/home
#resize2fs /dev/rhel/home 200M
--------------------------------------------------------------------
****
groupadd adminuser
useradd -G adminuser naXXX
useradd -g adminuser hXXX
useradd -s /sbin/nologin sarah (-s <shell>:指定用户登入后所使用的shell)
echo redhat | passwd --stdin sarah
echo redhat | passwd --stdin harry
echo redhat | passwd --natasha
驗證
ID 加XXX/
grep sarah/etc/passwd cat/etc/passwd
查ID到HOME下LS
------------------------------------------------------------------------------
555555
#cp /etc/fstab /var/tmp
# cd /var/tmp 看LS
setfacl -m u : natasha : rwfstab
setfacl -m u : harry : -fstab
(-M修改 -權限)
驗證 LL FSTAB
getfacl fstab
-----------------------------------------------------------------------------------
6666666666
#Crontab -e -u natasha
23 14 * * * /bin/echo hiya
驗證Crontab -l -u natasha
---------------------------------------------------------------------------------------------
7.
mkdir /home/admins
chgrp adminuser /home/admins
chmod g=r w x,o= -/home/admins
chmod g+s /home /admins
驗證 LL -d /home/admins
-----------------------------------------------------------------------------------------------
8.
# cd downloads
#ls
#rpm -ivh kemelXXXX
#reboot
---------------------------------------
9.LDAP
#yum -y install authconfig -gtk
#authconfig -gtk (叫出服務)
---------------------------------------------------------
10.
#yum install -y autofs
# vim /etc/auto.master
沒有留言:
張貼留言