windows terminal server RDP отключить client disk mapping.
Метки: rdp, shell script
чтобы сделать отключение этого параметра надо создать дополнительный прослушиваель rdp-tcp на другом порту (я сделал 3390), и включить параметр fDisableCdm в [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp-3390] к примеру.
но как запретить пользователям доступ к стандартному прослушивателю с параметрами по умолчанию:
1. создаем скрипт:
IF %ERRORLEVEL% NEQ 0 (
logoff
)
some program
2. ставим его в скрипты при входе через групповую политику.
- Блог пользователя administrator
- Комментировать
- Подробнее
- 117179 reads
Открыть доступ только к windows update для сети с ipfw шлюзом.
Метки: FreeBSD, shell script
Script to make ip addresses from domain names :
set -x
fin () {
cat /tmp/listx | sort | uniq > /tmp/listwin
ipfw table 1 flush
cat /tmp/listmail | while read ip; do
ipfw table 1 add $ip
done
ipfw table all list
}
rm /tmp/list*
while read -r name; do
i=1
while [ $i -le 15 ]; do
dig +short $name @8.8.8.8 >> /tmp/list1
dig +short $name @8.8.4.4 >> /tmp/list1
dig +short $name @77.88.8.8 >> /tmp/list1
dig +short $name @77.88.8.1 >> /tmp/list1
i=$(( i+1 ))
done
done</winupdate-hosts-list
bash multithreading xargs / reboot grandstream voip phones.
Метки: shell script
example reboot phone usage phone-reboot 192.168.0.1
sid=$(curl -s -c /tmp/cookies.txt -d"password=admin" http://${1}/cgi-bin/dologin | sed -r 's|.*"sid" : "([0-9a-z]+)".*|\1|' )
curl -b /tmp/cookies.txt -d"request=REBOOT&sid=${sid}" http://${1}/cgi-bin/api-sys_operation
reboot all founded:
str1=`arp -an | grep 00:0B`
rm -rf /tmp/tmp0011
while IFS= read -r line
do
ip=$(echo -n $line | grep -o -E '([0-9]{1,3}\.){3}[0-9a-z]{1,3}')
if [ "${ip}" ] ; then
echo Rebooting ${ip}
echo ${ip} >> /tmp/tmp0011
- Блог пользователя administrator
- Комментировать
- Подробнее
- 155115 reads
Shutting down esx using asterisk.
Метки: Asterisk, shell script, ssh
1. user is non root, need to login using it.
[root@as02 log]# su asterisk
This account is currently not available.
fixing this:
[root@as02 log]# chsh -s /bin/sh asterisk
to revert:
[root@as02 log]# chsh -s /sbin/nologin asterisk
2. ssh-keygen with default values and empty password.
3. it copies 2 files in home dir currently /var/lib/asterisk/.ssh
4. use public file in destionation server.
Generate public/private keys. For detailed instructions, see the OpenBSD Reference Manual from OpenBSD.
- 190938 reads
- Блог пользователя administrator
- Комментировать
- 177558 reads
send mail from file shell script
Метки: shell script
2 files:
mail.sh
while read i j; do
echo "Your password is: $j" | mail -s 'Your Password!' $i
sleep