
컴퓨터에 두 명의 사용자가 있다고 가정합니다.
- 앨리스 (관리자)
- 밥(표준 사용자)
Bob이 로그인되어 있는 동안 Alice는 어떻게 루트 파일을 수정할 수 있습니까(Bob은 에도 이 권한이 없습니다 sudo
)?
앨리스는 다음을 시도했습니다.
$ sudo vim /etc/hosts
[sudo] password for Bob:
Bob is not in the sudoers file. This incident will be reported.
답변1
사용 su
:
su - alice
sudo vim /etc/hosts
에서 man su
:
The su command is used to become another user during a login session.
Invoked without a username, su defaults to becoming the superuser. The
optional argument - may be used to provide an environment similar to
what the user would expect had the user logged in directly.
자세한 내용은 다음을 참조하세요.
man su
그리고위키피디아.