리눅스 / 명령어 / passwd / 사용자 암호 설정 명령어

사용자의 비밀번호 설정은 passwd 명령어로 한다.

비밀번호 만들기, 변경하기

  • 사용자 jb의 비밀번호를 만들거나 변경한다.
passwd jb

사용자을 적지 않으면 현재 로그인한 사용자의 비밀번호를 만들거나 변경한다.

비밀번호 삭제하기

  • 사용자 jb의 비밀번호를 삭제한다. 사용자는 비밀번호 입력 없이 로그인 가능하다.
passwd -d jb

비밀번호 잠그기, 잠금 풀기

  • 사용자 jb를 잠근다. 즉, 사용자는 로그인하지 못한다.
passwd -l jb
  • 사용자 jb의 잠금을 푼다.
passwd -u jb

비밀번호 만료시키기

  • 사용자 jb의 비밀번호를 만료시킨다. 로그인하면 비밀번호를 변경하라고 한다.
passwd -e jb

사용법 출력하기

  • 사용법과 옵션을 출력한다.
passwd -h
  • 결과는 다음과 같다.
Usage: passwd [options] [LOGIN]

Options:
  -a, --all                     report password status on all accounts
  -d, --delete                  delete the password for the named account
  -e, --expire                  force expire the password for the named account
  -h, --help                    display this help message and exit
  -k, --keep-tokens             change password only if expired
  -i, --inactive INACTIVE       set password inactive after expiration
                                to INACTIVE
  -l, --lock                    lock the password of the named account
  -n, --mindays MIN_DAYS        set minimum number of days before password
                                change to MIN_DAYS
  -q, --quiet                   quiet mode
  -r, --repository REPOSITORY   change password in REPOSITORY repository
  -R, --root CHROOT_DIR         directory to chroot into
  -S, --status                  report password status on the named account
  -u, --unlock                  unlock the password of the named account
  -w, --warndays WARN_DAYS      set expiration warning days to WARN_DAYS
  -x, --maxdays MAX_DAYS        set maximum number of days before password
                                change to MAX_DAYS
같은 카테고리의 다른 글

모니터 / 색 영역 / DCI-P3

DCI-P3는 디지털 시네마 이니셔티브(Digital Cinema Initiatives)에서 정의한 색 공간으로, 영화 산업에서 널리 사용됩니다. DCI-P3 색 공간은 sRGB보다 더 넓은 색 영역을 포함하여, 더 풍부하고 생생한 색상을 표현할 수 있습니다. 최근에는 고급 모니터와 TV에서도 DCI-P3 색 공간을 지원하여 더 뛰어난 색 재현성을 제공합니다. DCI-P3 색 공간 정의 DCI-P3는 디지털 영화 프로젝트를 위해 만들어진 색 ...

리눅스 / 명령어 / which, whereis, locate / 명령어 위치 찾기

명령어의 위치를 찾을 때 사용할 수 있는 명령어에는 which, whereis, locate가 있다. 명령어의 위치만 찾을 때는 which를 사용하고, 관련된 파일들의 위치까지 찾을 때는 whereis나 locate를 사용한다. which 명령어로 find 명령어를 찾는다. # which find /usr/bin/find whereis 명령어로 find 명령어를 찾는다. # whereis find find: /usr/bin/find /usr/share/man/man1/find.1.gz locate 명령어로 find 명령어를 찾는다. # locate find /usr/bin/find /usr/bin/find2perl /usr/bin/findmnt /usr/bin/nl-link-ifindex2name /usr/bin/nl-link-name2ifindex /usr/bin/oldfind /usr/lib64/python2.7/modulefinder.py /usr/lib64/python2.7/modulefinder.pyc /usr/lib64/python2.7/modulefinder.pyo /usr/sbin/btrfs-find-root /usr/sbin/findfs /usr/share/bash-completion/completions/findmnt /usr/share/doc/findutils-4.5.11 /usr/share/doc/findutils-4.5.11/AUTHORS /usr/share/doc/findutils-4.5.11/COPYING /usr/share/doc/findutils-4.5.11/ChangeLog /usr/share/doc/findutils-4.5.11/NEWS /usr/share/doc/findutils-4.5.11/README /usr/share/doc/findutils-4.5.11/THANKS /usr/share/doc/findutils-4.5.11/TODO /usr/share/doc/wpa_supplicant-2.6/examples/p2p/p2p_find.py /usr/share/doc/wpa_supplicant-2.6/examples/p2p/p2p_stop_find.py /usr/share/info/find-maint.info.gz /usr/share/info/find.info.gz /usr/share/locale/be/LC_MESSAGES/findutils.mo /usr/share/locale/bg/LC_MESSAGES/findutils.mo /usr/share/locale/ca/LC_MESSAGES/findutils.mo /usr/share/locale/cs/LC_MESSAGES/findutils.mo /usr/share/locale/da/LC_MESSAGES/findutils.mo /usr/share/locale/de/LC_MESSAGES/findutils.mo /usr/share/locale/el/LC_MESSAGES/findutils.mo /usr/share/locale/eo/LC_MESSAGES/findutils.mo /usr/share/locale/es/LC_MESSAGES/findutils.mo /usr/share/locale/et/LC_MESSAGES/findutils.mo /usr/share/locale/fi/LC_MESSAGES/findutils.mo /usr/share/locale/fr/LC_MESSAGES/findutils.mo /usr/share/locale/ga/LC_MESSAGES/findutils.mo /usr/share/locale/gl/LC_MESSAGES/findutils.mo /usr/share/locale/hr/LC_MESSAGES/findutils.mo /usr/share/locale/hu/LC_MESSAGES/findutils.mo /usr/share/locale/id/LC_MESSAGES/findutils.mo /usr/share/locale/it/LC_MESSAGES/findutils.mo /usr/share/locale/ja/LC_MESSAGES/findutils.mo /usr/share/locale/ko/LC_MESSAGES/findutils.mo /usr/share/locale/lg/LC_MESSAGES/findutils.mo /usr/share/locale/lt/LC_MESSAGES/findutils.mo /usr/share/locale/ms/LC_MESSAGES/findutils.mo /usr/share/locale/nl/LC_MESSAGES/findutils.mo /usr/share/locale/pl/LC_MESSAGES/findutils.mo /usr/share/locale/pt/LC_MESSAGES/findutils.mo /usr/share/locale/pt_BR/LC_MESSAGES/findutils.mo /usr/share/locale/ro/LC_MESSAGES/findutils.mo /usr/share/locale/ru/LC_MESSAGES/findutils.mo /usr/share/locale/rw/LC_MESSAGES/findutils.mo /usr/share/locale/sk/LC_MESSAGES/findutils.mo /usr/share/locale/sl/LC_MESSAGES/findutils.mo /usr/share/locale/sr/LC_MESSAGES/findutils.mo /usr/share/locale/sv/LC_MESSAGES/findutils.mo /usr/share/locale/tr/LC_MESSAGES/findutils.mo /usr/share/locale/uk/LC_MESSAGES/findutils.mo /usr/share/locale/vi/LC_MESSAGES/findutils.mo /usr/share/locale/zh_CN/LC_MESSAGES/findutils.mo /usr/share/locale/zh_TW/LC_MESSAGES/findutils.mo /usr/share/man/man1/find.1.gz /usr/share/man/man1/find2perl.1.gz /usr/share/man/man1/oldfind.1.gz /usr/share/man/man8/btrfs-find-root.8.gz /usr/share/man/man8/findfs.8.gz /usr/share/man/man8/findmnt.8.gz locate 명령어는 -n 옵션으로 출력 ...

Gmail / 읽기 창 설정으로 메일 목록에 메일 내용 표시하는 방법

Gmail / 읽기 창 설정으로 메일 목록에 메일 내용 표시하는 방법

지메일(Gmail)의 받은 편지함은 아래처럼 생겼습니다. 보낸 사람, 제목, 메일 앞부분 텍스트, 날짜 등이 한 줄로 나옵니다. 그리고 메일을 클릭하면 메일 목록이 사라지고, 메일 내용이 보입니다. 설정을 변경하면 마치 아웃룩처럼 왼쪽에 메일 목록, 오른쪽에 메일 내용이 나오게 할 수 있습니다. 메일 내용이 나오는 부분을 지메일에서는 읽기 창이라고 하는데요... 오른쪽 위의 톱니바퀴 아이콘을 클릭하고, ...

DNS 레코드 조회하는 사이트

DNS 레코드 조회하는 사이트

DNS 레코드를 조회하는 방법은 여러 가지가 있습니다. 예를 들어 OS가 윈도우라면 nslookup 명령어로 조회할 수 있습니다. 명령어를 사용하는 게 불편하다면 DNS 레코드를 조회해주는 사이트를 이용하는 게 편합니다.

네트워크 / 핑 테스트(ping test)

네트워크 / 핑 테스트(ping test)

핑 테스트란? 핑 테스트(ping test)는 네트워크 연결 상태를 확인하고 진단하기 위해 특정 네트워크 호스트에 패킷을 보내고 응답 시간을 측정하는 과정이다. 이는 네트워크 문제를 신속하게 식별하고 해결하는 데 유용하다. 핑 테스트는 인터넷 연결 문제, 네트워크 속도 문제, 또는 네트워크 장치 간의 연결 상태를 점검할 때 주로 사용된다. 네트워크 연결 상태 확인 특정 IP 주소나 ...

Ubuntu 22.04 Server / 원격 데스크톱으로 연결하는 방법

Ubuntu 22.04 Server / 원격 데스크톱으로 연결하는 방법

GUI 설치 우분투에 GUI를 설치한다. # apt install ubuntu-desktop-minimal xrdp 설치 xrdp를 설치한다. # apt install xrdp 방화벽 설정 원격 데스크톱은 3389 포트를 사용하므로, 방화벽을 사용하고 있다면 포트를 열어 준다. ufw allow 3389/tcp 원격 데스크톱 연결 원격 데스크톱으로 접속한다. 아래와 같은 창이 뜨는데, 를 클릭한다. 계정 정보를 입력하고 를 클릭하면... 원격지에서 GUI로 우분투를 즐길 수 있다.

4극 Y형 케이블 / 마이크를 노트북 또는 스마트폰에 연결하여 사용하는 방법

4극 Y형 케이블 / 마이크를 노트북 또는 스마트폰에 연결하여 사용하는 방법

노트북이나 스마트폰은 마이크가 기본적으로 장착되어 있습니다. 통화할 때는 문제가 없지만, 누군가에게 보여줄 영상을 찍기에는 잡음이 많이 들어갑니다. 그래서 유튜브 등을 위한 영상을 만들 때에는 별도의 마이크를 사용하게 되는데... 마이크에는 보통 3극 케이블이 달려 있습니다. 케이블 끝에 굵은 검은 선이 두 개 있는 것이 3극입니다. 3극 케이블은 헤드폰과 마이크 단자가 따로 있는 기기에 ...

워드프레스 / 플러그인 / WP Mail SMTP / 메일 발신 서버 변경 플러그인

워드프레스 / 플러그인 / WP Mail SMTP / 메일 발신 서버 변경 플러그인

워드프레스는 여러 가지 메일을 관리자 또는 사용자에게 보낸다. 메일 발송은 기본적으로 워드프레스가 설치된 시스템을 이용하는데, 시스템 설정에 따라 메일이 나가지 않거나, 메일이 발송되더라도 스팸으로 빠지는 경우가 생길 수 있다. 그런 경우 다른 SMTP 서버로 메일을 발송하여 문제를 해결할 수 있다. WP Mail SMTP는 워드프레스가 다른 SMTP로 메일을 발송하게 해주는 플러그인이다. 사용자가 ...

당구 / 메모

당구 / 메모

임계각 파란색을 따라 치면 회전을 더 주든 덜 주든 3쿠션 지점이 비슷하다. ①번처럼 파란색보다 큰 각인 경우 회전을 많이 줄수록 3쿠션 지점이 길어진다. ②번처럼 파란색보다 작은 각인 경우 회전을 덜 줄수록 3쿠션 지점이 길어진다.  

Wireshark / 사용법

Wireshark / 사용법

Wireshark는 패킷 분석 프로그램이다. 오픈 소스로 자유롭게 사용할 수 있다. The non-profit Wireshark Foundation supports the development of Wireshark, a free, open-source tool used by millions around the world. Wireshark is distributed under the GNU GPLv2. There are no restrictions on its use. There are restrictions on its distribution in source or ...