mps-yetkilendir

This commit is contained in:
milisbir 2018-11-25 19:08:08 +02:00
parent 5e44b3bbc5
commit a8e83c7e16
1 changed files with 6 additions and 1 deletions

View File

@ -1,2 +1,7 @@
#!/bin/bash
sudo echo "`whoami` ALL=(ALL) NOPASSWD:/root/bin/mps" >> /etc/sudoers
_hata(){
echo "mps yetkili kullanıcı ismini giriniz. ör: mps_yetkilendir ali"
exit 1
}
[ $1 ] && user=$1 || _hata
sudo echo "${userx} ALL=(ALL) NOPASSWD:/root/bin/mps" >> /etc/sudoers