This commit is contained in:
陆柯 2022-06-17 12:32:53 +08:00
parent 553310cf5b
commit 39b54a54c3
5 changed files with 9 additions and 5 deletions

View File

@ -34,6 +34,10 @@ chmod a-w /etc/sudoers.d/${NewUser//./-}
echo
# 注意,在这里为新用户创建的配置文件,主人是 root而不是新用户
echo "<<< Configure $NewUser home"
echo "<<< Configure $NewUser home with standard scripts? (注意,由 root 为新用户创建的配置文件的 owner 是 root而不是新用户)"
read -p "y for yes, anything else for no >> " YesOrNo
if [ $YesOrNo = 'y' ]
then
source /faronear/fon/sysconfig/home-config.sh /faronear/fon/sysconfig/nixhome /home/$NewUser
echo
fi

View File

@ -56,7 +56,6 @@ echo "<<< Add a new user $NewUser"
source /faronear/fon/sysconfig/debian-add-user.sh $NewUser
echo
echo "<<< Disallow root login: #PermitRootLogin yes"
# emacs /etc/ssh/sshd_config
sed -i "s|^PermitRootLogin yes|#PermitRootLogin yes|g" /etc/ssh/sshd_config

0
debian-install.sh → debian-ddinstall.sh Executable file → Normal file
View File

View File

@ -35,7 +35,7 @@ echo Install Docker-Compose ...
sudo curl -L $COMPOSE_URL/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
read -p "配置中国加速镜像源 /etc/docker/daemon.json (d: Docker中国, t: 腾讯云, z: 中科大) >> " DOCKER_MIRROR
read -p "配置中国加速镜像源 /etc/docker/daemon.json (d: Docker中国, t: 腾讯云, z: 中科大, leave blank for no mirror) >> " DOCKER_MIRROR
if [ $DOCKER_MIRROR = 'd' ]
then
DOCKER_MIRROR=https://registry.docker-cn.com

View File

@ -4,6 +4,7 @@ if [ $1 ]
then
SourcePath=$1
else
echo "Configure private home settings"
echo "Usage: setup.sh [Config-Source-Path] [User-Home-Path]"
read -p "Enter config source path (leave blank for [/Users/luk.lu]/faronear/fon/sysconfig/nixhome) >> " SourcePath
if [ ! $SourcePath ]
@ -39,7 +40,7 @@ then
do
rm -fr $homescript.backup
mv $homescript $homescript.backup
ln -s $SourcePath/$homescript $HomePath
cp -r $SourcePath/$homescript $HomePath
done
popd
else