This commit is contained in:
hart0s 2026-03-05 12:42:04 +05:00
parent 8679e3c6cc
commit f6d9921139

6
usr Normal file → Executable file
View file

@ -8,10 +8,10 @@ useradd -m remote_user 2>/dev/null
# 2. Пользователь sshuser (UID 2026, пароль P@ssw0rd)
useradd -u 2026 -m sshuser 2>/dev/null
echo "sshuser:P@ssw0rd" | chpasswd
echo "sshuser:123" | chpasswd
# 3. Sudo без пароля для sshuser
echo "sshuser ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/sshuser
chmod 440 /etc/sudoers.d/sshuser
echo "sshuser ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers
chmod 440 /etc/sudoers
echo "Готово"