Added adm.sh
This commit is contained in:
commit
04228bea32
19
adm.sh
Normal file
19
adm.sh
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
pcname=""
|
||||||
|
onContinue=true
|
||||||
|
while $onContinue; do
|
||||||
|
read -p "Введите номер пк: A-PC-KC-" pcname
|
||||||
|
pcname="A-PC-KC-$pcname"
|
||||||
|
if [[ $pcname =~ ^A-PC-KC-[0-9]{2}$ ]]; then
|
||||||
|
while true; do
|
||||||
|
read -p "Имя ПК $pcname. Сохранить? [y/n]" ans
|
||||||
|
if [[ $ans =~ ^([Yy]es|[Yy]|[Дд]а|[Дд])$ ]]; then
|
||||||
|
onContinue=false
|
||||||
|
break
|
||||||
|
elif [[ $ans =~ ^([Nn]o|[Nn]|[Нн]ет|[Нн])$ ]]; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
su -c "apt-get update && apt-get install task-auth-ad-sssd -y && system-auth write ad mtuci.adm $pcname MTUCI 'vvod' ':TcyMH@DEy4tE6xls4>S@GQJbM_SwX'"
|
||||||
Loading…
Reference in New Issue
Block a user