계정 추가
sudo 권한 추가
계정 관리
/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