Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
ubuntu1604:5:4:2 [2017/05/04 11:10]
Piotr Kłoczewski [Remediation]
ubuntu1604:5:4:2 [2017/05/04 11:15]
Piotr Kłoczewski [Remediation]
Line 27: Line 27:
 #​!/​bin/​bash ​ #​!/​bin/​bash ​
 for user in `awk -F: '($3 < 1000) {print $1 }' /​etc/​passwd`;​ do  for user in `awk -F: '($3 < 1000) {print $1 }' /​etc/​passwd`;​ do 
-if [ $user != "​root"​ ]; then + if [ $user != "​root"​ ]; then 
- ​usermod -L $user  +  usermod -L $user  
-if [ $user != "​sync"​ ] && [ $user != "​shutdown"​ ] && [ $user != "​halt"​ ]; then +  if [ $user != "​sync"​ ] && [ $user != "​shutdown"​ ] && [ $user != "​halt"​ ]; then 
- ​usermod -s /​usr/​sbin/​nologin $user  +   ​usermod -s /​usr/​sbin/​nologin $user  
-fi  +  fi  
-fi + ​fi ​
 done done
 </​Code>​ </​Code>​