Linux/Ubuntu2011. 10. 5. 22:56
visudo를 이용해서 Defaults에 아래의 항목을 추가하면 600분(10시간) 동안 물어보지 않는다.
$ sudo visudo
Defaults        env_reset,timestamp_timeout=600 

[링크 : http://ubuntu.or.kr/viewtopic.php?p=47637]
[링크 : http://lumitech.tistory.com/entry/sudoAndSudoer]

'Linux > Ubuntu' 카테고리의 다른 글

vlan on ubnutu  (0) 2011.11.05
netbeans package - ubuntu  (0) 2011.10.22
리눅스에서 하드 I/O 사용량 측정하는 방법  (0) 2011.09.27
엠퍼시 (empathy) 에서 음성대화하기  (2) 2011.09.25
우분투 LTS 지원기간  (0) 2011.09.24
Posted by 구차니
Linux/Fedora Core2010. 3. 24. 15:34
sudo는 일시적으로 권한을 상승시켜 특정 프로그램을 실행하는 명령어이다.
그런데, FC6에서는 기본적으로 sudo를 사용하지 않고 있어서 추가를 해주어야 한다.


/etc/sudoers 는 설정파일로
## Next comes the main part: which users can run what software on
## which machines (the sudoers file can be shared between multiple
## systems).
## Syntax:
##
##      user    MACHINE=COMMANDS
##
## The COMMANDS section may have other options added to it.
##
## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL
이 부분만 추가되어있다.
이 줄을 복사해서 root 대신 사용자 아이디를 넣어주면, 그 사용자는 모든 명령어에 대해 sudo로 실행할수 있게 된다.

예를 들어 dev라는 사용자를 추가하려면
dev    ALL=(ALL)       ALL
를 추가해주면 된다.


하지만, 이렇게만 하면 아래와 같은 문구가 나타난다.(lecture)
$ sudo ls

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

Password:

이녀석을 매번 보기 싫다면
Defaults    lecture = never
이 녀석을 한줄 추가해주면

ubuntu 처럼 깔끔하게
$ sudo ls
Password:
요렇게만 물어본다.

원래대로라면 직접 /etc/sudoers를 vi로 수정하지 말고
visudo 라는 vi를 이용하여 안전하게 수정을 해야 하지만, FC6에서는 없는듯 하다.

       lecture     This option controls when a short lecture will be printed along with the password prompt.
                   It has the following possible values:

                   never   Never lecture the user.
                   once    Only lecture the user the first time they run sudo.
                   always  Always lecture the user.

                   If no value is specified, a value of once is implied.  Negating the option results in a value of
                   never being used.  The default value is once.

       lecture_file
                   Path to a file containing an alternate sudo lecture that will be used in place of the standard lec-
                   ture if the named file exists.

[링크 : http://linux.die.net/man/5/sudoers]

[링크 : http://www.mjmwired.net/resources/mjm-fedora-fc6.html]
[링크 : http://ubuntuforums.org/archive/index.php/t-483591.html]
Posted by 구차니
Linux/Ubuntu2010. 2. 4. 21:20
우분투 데스크탑 버전만 쓰다보니, 여러 사용자의 권한을 생각해본적이 없다.
아무튼, 이런저런 이유로 인해 우분투에서 여러 사람이 쓰게 되었는데

역시나.. 초기추가하는 사용자는 기본적으로 sudo user로 추가가 된다.
간단하게 sudo 를 사용할수 있도록 하는 방법은 admin 그룹에 추가하는 것이다.

/etc/sudoers 에 WHEEL 이란건 먼지 좀 읽어봐야 할듯하다.

[링크 : http://zicman.egloos.com/2449683]
[링크 : http://wiki.kldp.org/wiki.php/sudo]

+
2019.10.28

아래의 명령을 이용하면 sudoer로 등록이 가능하다,.


Posted by 구차니