테스트 환경
- OS : Centos 7.9
sudo
일반 사용자가 루트 권한을 임시로 획득하여 특정 명령을 가능하게 하는 명령어
▶ 보안 상 문제가 발생할 수 있기 때문에 운영기에 권장하지 않음 테스트 용으로 진행
sudousers 확인
[root@tiberovm ~]# ls -al /etc/sudoers
-r--r-----. 1 root root 4328 Sep 30 2020 /etc/sudoers
sudousers 설정
- root 계정에서 진행
[root@tiberovm ~]# vi /etc/sudoers
or
[root@tiberovm ~]# visudo
line 100 ~ 101
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
test ALL=(ALL) ALL <- 추가
- 그외 설정 (테스트 할때는 설정하지 않음)
## Allows people in group wheel to run all commands
## 그룹에 포함된 모든 사용자에게 sudo 사용 권한 부여
%wheel ALL=(ALL) ALL
## Same thing without a password
## 패스워드 생략 설정
# %wheel ALL=(ALL) NOPASSWD: ALL
sudousers 확인
[test@tiberovm:/home/test]$ sudo passwd roo
Changing password for user roo.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.'OS > Linux' 카테고리의 다른 글
| [SCHEDULER] CRONTAB 설정 관련 (0) | 2023.03.14 |
|---|---|
| [SHELL] 쉘스크립트_sql문 실행 (0) | 2023.03.09 |
| [SHELL] 쉘 스크립트_프로세스 상태 확인 (0) | 2023.03.09 |
| [OS] 커널 부팅 순서 변경하기 (0) | 2023.02.13 |
| [ETC] Samba 설치 및 Linux와 Window간 파일 공유하기 (0) | 2023.01.30 |