[setup-debian.sh] 用 sed 代替 emacs
This commit is contained in:
parent
5558bdd482
commit
50585ee995
1
.bashrc
1
.bashrc
@ -43,6 +43,7 @@ alias ssh='ssh -C -X'
|
||||
alias cvs='cvs -z9'
|
||||
|
||||
alias ps='ps -elf'
|
||||
alias emacs='emacs -nw'
|
||||
|
||||
# Set default file permission mask:
|
||||
umask 022 # rwxr-xr-x
|
||||
|
@ -20,15 +20,18 @@ useradd $User
|
||||
passwd $User
|
||||
mkdir /home/$User
|
||||
chown $User:$User /home/$User
|
||||
emacs /etc/passwd
|
||||
# emacs /etc/passwd
|
||||
sed -i "s/\/home\/$User:/\/home\/$User:\/bin\/bash/g" /etc/passwd
|
||||
|
||||
echo ">>> allow sudo without password: %sudo ALL=(ALL:ALL) NOPASSWD:ALL"
|
||||
chmod o+w /etc/sudoers
|
||||
emacs /etc/sudoers
|
||||
# emacs /etc/sudoers
|
||||
sed -i "s/%sudo\s+ALL*/%sudo ALL=(ALL:ALL) NOPASSWD:ALL/g" /etc/sudoers
|
||||
chmod o-w /etc/sudoers
|
||||
|
||||
echo ">>> disallow root login: #PermitRootLogin yes"
|
||||
emacs /etc/ssh/sshd_config
|
||||
sed -i "s/^PermitRootLogin yes/#PermitRootLogin yes/g" /etc/ssh/sshd_config
|
||||
# emacs /etc/ssh/sshd_config
|
||||
service sshd restart
|
||||
|
||||
echo ">>> configure locales: install all-locales, default to zh-CN.UTF-8"
|
||||
|
Loading…
Reference in New Issue
Block a user