
저는 리눅스 머신 2대, VPS 1대, 라즈베리 파이 1대를 가지고 있습니다.
문제:
루트 함수를 호출할 때 예를 들어 service "a service" restart
이 두 경우는 모두 다르게 나타납니다. 일부 사용자는 두 경우 모두 sudoer임에도 불구하고 가능한 인증 사용자로 표시되지 않습니다.
VPS:
Authentication is required to manage system services or units.
Multiple identities can be used for authentication:
1. user1
2. cybex
3. ,,, (backup-user)
4. steam
Choose identity to authenticate as (1-4):
라즈베리 파이
user1 및 cybex는 모두 사용자이자 sudoer(사용자는 sudoers 파일에 있고 sudo 그룹의 일부임)이지만 나열되지 않습니다.
Authentication is needed to run `/usr/bin/nano' as the super user
Multiple identities can be used for authentication:
1. ,,, (pi)
2. root
Choose identity to authenticate as (1-2):
왜 이런 일이 발생하고 달라질까요?
답변1
글쎄, 현재 sudoers는 Linux 배포판에서 사용자 권한을 제어하는 유일한 방법은 아닙니다. 아마도 polkit 기반 인증이 있을 것입니다.
사용자 cybex를 polkit의 관리자로 설정하려면 다음 위치에 파일을 생성하십시오./etc/polkit-1/localauthority.conf.d/99-cybex.conf
다음을 포함:
[Configuration]
AdminIdentities=unix-user:cybex
도움이 되겠지만 구성은 Distro에 따라 다르므로 polkit
매뉴얼 페이지를 읽거나 확인해 보세요.이것또는이것link 또는 google it 키 이름을 Distro 이름과 함께 사용하세요.
답변2
sudo
파일에서 그룹에 자신을 추가하세요 ./etc/group