Difference between revisions of "Advanced"
From AlphaBook
(→Mailx) |
|||
Line 58: | Line 58: | ||
== Mailx == | == Mailx == | ||
* yum info mailx | * yum info mailx | ||
− | * yum install mailx | + | * yum install mailx sendmail |
− | |||
* echo "My Body" | mailx "to@alphabook.cn" -r "from@alphabook.cn" -s "My Subject" -S smtp=smtp.alphabook.cn -v | * echo "My Body" | mailx "to@alphabook.cn" -r "from@alphabook.cn" -s "My Subject" -S smtp=smtp.alphabook.cn -v | ||
+ | * Error: My unqualified host name (linux01) unknown | ||
+ | ** vi /etc/hosts | ||
+ | ** 127.0.0.1 linux01 linux01.corp.alphabook.cn |
Revision as of 14:13, 14 March 2019
Contents
tail
- tail /var/log/maillog -f
autofs
fdisk
- df -h
- fdisk -l
- fdisk -l /dev/sda
- Create new partition
- fdisk /dev/sdb
- m
- n
- p
- 1
- ENTER
- ENTER
- w
- partprobe
- fdisk -l /dev/sdb
Recover root password
- Press E to edit boot menu
- Add rd.break at the line of "linux16"
- Press Ctrl+X
- mount -o remount,rw /sysroot
- chroot /sysroot
- passwd
- touch /.autorelabel
User Management
- UID starts from 1000
- /etc/passwd
- /etc/shadow
- /etc/group
- /etc/gshadow
- /etc/sudoers
- useradd tshen -c "Terry Shen"
- passwd tshen
- groupadd
- userdel
- groupdel
- usermod
- groupmod
Join in A Windows Domain
- yum install realmd sssd adcli samba-common-tools
- realm discover corp.alphabook.cn
- realm join corp.alphabook.cn
- vi /etc/sssd/sssd.conf
- cache_credentials = True
- use_fully_qualified_names = False
- fallback_homedir = /home/%u
- systemctl is-enabled sssd
- systemctl enable sssd
- systemctl restart sssd
Mailx
- yum info mailx
- yum install mailx sendmail
- echo "My Body" | mailx "to@alphabook.cn" -r "from@alphabook.cn" -s "My Subject" -S smtp=smtp.alphabook.cn -v
- Error: My unqualified host name (linux01) unknown
- vi /etc/hosts
- 127.0.0.1 linux01 linux01.corp.alphabook.cn