티스토리 뷰

Linux/TIP

계정 관리

이주성 2020. 4. 19. 21:40
user

계정 추가

sudo adduser newuser

sudo 권한 추가

sudo visudo

계정 관리

/etc/passwd

plex:x:123:128::/var/lib/plexmediaserver:/bin/bash
debian-transmission:x:124:129::/var/lib/transmission-daemon:/bin/false
ftp:x:125:130:ftp daemon,,,:/srv/ftp:/bin/false
anonymous:x:1001:1001::/home/anonymous:/bin/bash
jusung:x:1002:1002:Jusung LEE,,,:/home/jusung:/bin/bash

Login shell이 /bin/bash 처럼 안되있고 없거나 그러면, ssh login시 shell이 깨진다.

/etc/passwd 필드 설명
User name
Encrypted password x means that the password is stored in the /etc/shadow file)
User ID number (UID)
User’s group ID number (GID)
Full name of the user (GECOS)
User home directory
Login shell defaults to /bin/bash

그룹 관리

/etc/group

sudo:x:27:odroid,jusung
audio:x:29:pulse
dip:x:30:odroid
www-data:x:33:odroid
backup:x:34:
operator:x:37:
list:x:38:
irc:x:39:
/etc/group 필드 설명
group_name It is the name of group. If you run ls -l command, you will see this name printed in the group field.
Password Generally password is not used, hence it is empty/blank. It can store encrypted password. This is useful to implement privileged groups.
Group ID (GID) Each user must be assigned a group ID. You can see this number in your /etc/passwd file.
Group List It is a list of user names of users who are members of the group. The user names, must be separated by commas

계정이 가진 group 확인

odroid@odroid:~$ groups
odroid adm dialout cdrom sudo dip www-data video plugdev lpadmin lightdm debian-transmission
jusung@odroid:~$ groups
jusung sudo nas-group

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

linux에서 소스 받아서 설치하기 (linux 폴더 구조)  (0) 2020.12.25
FTP 서버 설치 (ubuntu 기준)  (0) 2020.12.04
유저그룹 (USER GROUP)  (0) 2018.09.18
syntaxhighlighter  (0) 2013.01.14
좀비프로세스 죽이기  (0) 2013.01.11
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함