-
-
Notifications
You must be signed in to change notification settings - Fork 406
Expand file tree
/
Copy pathrootaccess
More file actions
24 lines (17 loc) · 552 Bytes
/
Copy pathrootaccess
File metadata and controls
24 lines (17 loc) · 552 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
function f_rootaccess {
echo "[$SCRIPT_COUNT] root access"
if ! grep -E '^+\s:\sroot\s:\s127.0.0.1$|^:root:127.0.0.1' "$SECURITYACCESS"; then
sed -i 's/^#.*root.*:.*127.0.0.1$/+:root:127.0.0.1/' "$SECURITYACCESS"
fi
echo "console" > /etc/securetty
((SCRIPT_COUNT++))
echo "[$SCRIPT_COUNT] Mask debug-shell"
systemctl mask debug-shell.service
systemctl stop debug-shell.service
systemctl daemon-reload
if [[ $VERBOSE == "Y" ]]; then
systemctl status debug-shell.service --no-pager
echo
fi
((SCRIPT_COUNT++))
}