직접 사용된 루트는 SSH를 통해 작동하지 않습니다.

직접 사용된 루트는 SSH를 통해 작동하지 않습니다.

기본적으로 루트가 비활성화된 Linux 시스템이 있습니다.
나는 그것을 활성화했습니다 ( passwd root그리고 ssh를 통해 루트에 로그인을 활성화했습니다).
그러나 SSH를 통해 루트에 로그인하면 할 수 있는 일이 없습니다. 내가 실행하는 모든 쓰기 명령에 대해 "권한이 거부되었습니다"라는 메시지가 표시됩니다(예: touch test).
그러나 SSH를 통해 sudo 권한을 가진 다른 사용자(user1)에 로그인하고 su rootwrite 명령을 실행하면 완벽하게 작동합니다.
이러한 행동은 정말 이상하고 어떻게 고칠 수 있을지 궁금합니다.


user1과 root는 모두 gid 및 동일한 추가 그룹을 갖습니다.
둘 다 동일한 권리를 갖습니다./etc/sudoers

user1@astra-1-7-rc14:~$ id root
uid=0(root) gid=0(root) groups=0(root),24(cdrom),27(sudo),29(audio),30(dip),44(video),46(plugdev),109(netdev),115(lpadmin),1001(astra-admin),333(astra-console)
user1@astra-1-7-rc14:~$ id user1
uid=1000(user1) gid=1000(user1) groups=1000(user1),24(cdrom),29(audio),30(dip),44(video),46(plugdev),109(netdev),115(lpadmin),1001(astra-admin),333(astra-console)

다음은 sudoers 파일입니다.

Defaults        env_reset
Defaults        mail_badpass
Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL:ALL) ALL

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d
%astra-admin    ALL=(ALL:ALL) ALL

관련 정보