openssl md5 /etc/passwd
md5sum /etc/passwd
openssl sha512 /etc/passwd
sha512sum /etc/passwd
openssl passwd -6 -salt LlWf/IWGEZYCYlXQ
(umask 077; openssl genrsa -out /data/wang.org.key 2048)
openssl genrsa -out /data/app1.key -des3 2048
(umask 066; openssl rsa -in /data/app1.key -pubout -out /data/app1.pub)
openssl rsa -in /data/app2.key -pubout -out /data/app2.pub
openssl req -new -x509 -key /etc/pki/CA/private/cakey.pem -days 3650 -out cacert.pem
mkdir -pv /etc/pki/CA/{private,certs,crl,newcerts}
touch /etc/pki/CA/index.txt
echo 0F > /etc/pki/CA/serial
cd /etc/pki/CA
(umask 077; openssl genrsa -out private/cakey.pem 2048)
openssl req -new -x509 -key private/cakey.pem -days 3650 -out -cacert.pem
openssl x509 -in cacert.pem -noout -text
mkdir -p /data/app1
(umask 066; openssl genrsa -out /data/app1/app1.key 2048)
openssl req -new -key /data/app1/app1.key -out /data/app1/app1.csr
openssl ca -in /data/app1/app1.csr -out app1.crt -days 3650
cat .ssh/known_hosts
cat /etc/ssh/ssh_config
cat /etc/ssh/sshd_config
ssh -p 9527 11.0.1.111
scp /etc/fstab 11.0.1.111:
scp -P 9527 /etc/fstab 11.0.1.111:
scp 11.0.1.111:/etc/fstab .
rsync -av * 11.0.1.111:
ssh-keygen
ssh-copy-id 11.0.1.111
sshpass -p redhat ssh 11.0.1.111
sshpass -p redhat ssh-copy-id -o StrictHostKeyChecking=no -i /root/.ssh/id_rsa.pub 11.0.1.111
cat /etc/sudoers
visudo
vim /etc/sudoers标签:第十四天,etc,app1,回炉,usr,key,linux,data,out From: https://blog.51cto.com/dayu/5987189
wang ALL=(ALL) /usr/sbin/fdisk, !/usr/sbin/fdisk /dev/sda, /usr/bin/su - ?*, !/usr/bin/su - root, /usr/bin/passwd ?*, !/usr/bin/passwd root
li 11.0.1.105=(ALL) /usr/sbin/fdisk /dev/sdb
zhang ALL=(ALL) PASSWD: /usr/sbin/fdisk -l, NOPASSWD: /usr/sbin/fdisk /dev/sdb
liu ALL=(ALL) /usr/bin/cat /var/log/message*, !/usr/bin/cat /var/log/message* *
sudo -V
sudo -K
sudo -i