Differences
This shows you the differences between two versions of the page.
Last revisionBoth sides next revision | |||
ubuntu1604:5:4:2 [2017/05/04 13:07] – created Piotr Kłoczewski | ubuntu1604:5:4:2 [2017/05/04 13:10] – [Remediation] Piotr Kłoczewski | ||
---|---|---|---|
Line 25: | Line 25: | ||
The following script will automatically set all user shells required to ''/ | The following script will automatically set all user shells required to ''/ | ||
< | < | ||
- | # | + | #!/bin/bash |
- | for user in `awk -F: '($3 < 1000) {print $1 }' / | + | for user in `awk -F: '($3 < 1000) {print $1 }' / |
+ | if [ $user != " | ||
+ | usermod -L $user | ||
+ | if [ $user != " | ||
+ | usermod -s / | ||
+ | fi | ||
+ | fi | ||
+ | done | ||
</ | </ |