일반 사용자가 root 권한으로 명령어를 실행할때 sudo (superuser do) 를 사용한다. root 는 시스템을 완벽히 제어하므로 가급적 사용시간을 최소화 하는 것이 좋다.
가장 쉽게 sudo 를 사용하는 방법은 wheel 그룹에 생성한 유저를 추가하는 것이다.
[root@localhost ~]# gpasswd -a python wheel
사용자 python을(를) wheel 그룹에 등록 중
-a 옵션은 add User
위의 명령은 python 사용자를 wheel 그룹에 추가하는 예이다.
만약 psssword 입력이 귀찮다면
/etc/sudoers 파일을 열어
%wheel ALL=(ALL) ALL
## Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
다음과 같이 바꾼다.
# %wheel ALL=(ALL) ALL
## Same thing without a password
%wheel ALL=(ALL) NOPASSWD: ALL
'Linux' 카테고리의 다른 글
리눅스 (Linux) crontab-e 하면 nano 에서 열린다. 난 vi 로 열고 싶다. (0) | 2022.08.19 |
---|---|
Ubuntu 20.04 APM 설치 (0) | 2022.06.20 |
centos 8 yum 에러 (0) | 2022.06.16 |
Vi Editor 이것만은 외우자 (0) | 2022.04.06 |
certbot-auto SSL 인증서 확인 및 갱신 (0) | 2022.03.21 |