[리눅스] 등록된 사용자 리스트 조회 > server

본문 바로가기
사이트 내 전체검색

server

[리눅스] 등록된 사용자 리스트 조회

페이지 정보

작성자 서방님 댓글 0건 조회 132회 작성일 14-01-24 08:57

본문

cat  /etc/passwd
-----------------------------
앞에 보이는 것들이 등록된 아이디

 

 

명령어
 /etc/
  -d: /etc/
예시
[rootjmnote ~]# cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
.. 생략
named:x:25:25:Named:/var/named:/sbin/nologin
[rootjmnote ~]# cut -f1 -d: /etc/passwd
root
bin
daemon
.. 생략
named

 

bash 사용자 목록

useradd로 계정을 만들면 기본적으로 /bin/bash 환경이 적용된다. bash 사용자 목록이 의미 있는 경우가 많다.

명령어
 /bin/ /etc/
 /bin/ /etc/ |   -d:
예시
[rootjmnote ~]# grep /bin/bash /etc/passwd
root:x:0:0:root:/root:/bin/bash
mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bash
[rootjmnote ~]# grep /bin/bash /etc/passwd  cut -f1 -d:
root
mysql

 

 

 

댓글목록

등록된 댓글이 없습니다.

Total 356건 14 페이지
게시물 검색

회원로그인

접속자집계

오늘
132
어제
225
최대
1,347
전체
154,891
Latest Crypto Fear & Greed Index

그누보드5
Copyright © 서방님.kr All rights reserved.