"리눅스 패스워드 파일 /etc/passwd"의 두 판 사이의 차이

8번째 줄: 8번째 줄:
==내용 예시==
==내용 예시==
<source lang='console'>
<source lang='console'>
john@zetawiki:~$ cat /etc/passwd | grep postgres
john@zetawiki:~$ cat /etc/passwd | egrep 'root|mysql|postgres|john'
root:x:0:0:root:/root:/bin/bash
mysql:x:110:120:MySQL Server,,,:/nonexistent:/bin/false
postgres:x:111:121:PostgreSQL administrator,,,:/var/lib/postgresql:/bin/bash
postgres:x:111:121:PostgreSQL administrator,,,:/var/lib/postgresql:/bin/bash
</source>
<source lang="console">
john@zetawiki:~$ cat /etc/passwd | grep john
john:x:1001:1001::/home/john:/bin/bash
john:x:1001:1001::/home/john:/bin/bash
</source>
</source>
18번째 줄: 17번째 줄:
*/etc/passwd 필드 이해
*/etc/passwd 필드 이해
{| class='wikitable'
{| class='wikitable'
! 항목 !! 예시1 !! 예시2
! 항목 !! 예시1 !! 예시2 !! 예시3 !! 예시4
|-
|-
| 사용자명(아이디) || postgres || john
| 사용자명(아이디) || root || mysql || postgres || john
|-
|-
| 패스워드 || x || x
| 패스워드 || x || x || x || x
|-
|-
| 사용자ID([[UID]]) || 111 || 1001
| 사용자ID([[UID]]) || 0 || 110 || 111 || 1001
|-
|-
| 그룹ID([[GID]]) || 121 || 1001
| 그룹ID([[GID]]) || 0 || 120 || 121 || 1001
|-
|-
| 정보 || PostgreSQL administrator,,, ||  
| 정보 || root || MySQL Server,,, || PostgreSQL administrator,,, ||  
|-
|-
| 홈디렉토리 || /var/lib/postgresql || /home/john
| 홈디렉토리 || /root || /nonexistent || /var/lib/postgresql || /home/john
|-
|-
| 쉘환경 || /bin/bash || /bin/bash
| 쉘환경 || /bin/bash || /bin/false || /bin/bash || /bin/bash
|}
|}



2016년 5월 8일 (일) 02:07 판

  다른 뜻에 대해서는 리눅스 passwd 문서를 참조하십시오.

1 개요

리눅스 패스워드 파일
/etc/passwd
  • 텍스트 기반의 파일
  • 시스템에 로그인하는 사용자에 관한 정보를 담고 있음

2 내용 예시

john@zetawiki:~$ cat /etc/passwd | egrep 'root|mysql|postgres|john'
root:x:0:0:root:/root:/bin/bash
mysql:x:110:120:MySQL Server,,,:/nonexistent:/bin/false
postgres:x:111:121:PostgreSQL administrator,,,:/var/lib/postgresql:/bin/bash
john:x:1001:1001::/home/john:/bin/bash
  • /etc/passwd 필드 이해
항목 예시1 예시2 예시3 예시4
사용자명(아이디) root mysql postgres john
패스워드 x x x x
사용자ID(UID) 0 110 111 1001
그룹ID(GID) 0 120 121 1001
정보 root MySQL Server,,, PostgreSQL administrator,,,
홈디렉토리 /root /nonexistent /var/lib/postgresql /home/john
쉘환경 /bin/bash /bin/false /bin/bash /bin/bash

3 같이 보기

4 참고 자료

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}