티스토리 뷰

Operating System/FreeBSD

USER 관리

do9dark 2015. 7. 5. 16:04

- USER 생성

대화식 생성 방법

# adduser



- USER 삭제

대화식 삭제 방법

# rmuser

(FreeBSD 설치 시, freebsd(기본 계정)에 대해서 적절한 조치가 필요함)

USER 삭제

# pw userdel username


USER 삭제(홈디렉터리 포함)

# pw userdel username -r



- Anonymous FTP user 계정 생성



- USER 권한 상승

일반 사용자 권한으로 su 명령어를 사용할 수가 없다. 

su: Sorry

su: Sorry for normal user account.


일반 사용자 권한으로 su 명령어를 사용하기 위해서는 wheel 그룹을 추가하면 된다.

You can fix this problem by adding user account to the wheel group. PAM is used to set the policy su will use. In particular, by default only users in the wheel group can switch to UID 0 (root). This group requirement may be changed by modifying the pam_group section of /etc/pam.d/su file. wheel is a special group for system administration purpose. Add your normal user to this group using the pw command. The syntax is:

# pw usermod username -G wheel


# vi /etc/group

추가하고 싶은 그룹에 직접 유저명을 추가해줘도 된다.


그룹이 추가가 되었는 지 확인

# groups username



- wheel 그룹을 추가하지 않고 su 설정을 변경하여 wheel 그룹이 아닌 일반 사용자들도 su 명령어를 사용 가능

You can disable this behavior complete for all users (not recommended until and unless you trust ALL of your users). Open pam configuration file for su using a text editor such as vi or vim:

# vi /etc/pam.d/su


Find the following line and comment it out:

auth requisite pam_group.so no_warn group=wheel root_only fail_safe ruser


Replace with:

#auth requisite pam_group.so no_warn group=wheel root_only fail_safe ruser


Save and close the file. Now all users can use su command to become root or superuser.



- USER 정보 변경

# chsh

chsh username을 통해 다른 사용자의 정보도 변경할 수 있다.

'Operating System > FreeBSD' 카테고리의 다른 글

tmux 설치 및 설정  (0) 2015.10.18
FAMP - Installing Apache, MySQL, PHP on FreeBSD  (0) 2015.07.22
python27, py-pip 설치 및 설정  (0) 2015.07.22
bash 설치 및 설정  (0) 2015.07.22
vim-tiny 설치 및 설정  (0) 2015.07.12
Portsnap  (0) 2015.07.12
FTP 설정  (0) 2015.07.05
날짜/시간 설정  (0) 2015.07.02
Network 및 Hostname 설정  (0) 2015.07.02
Raspberry Pi 2에 FreeBSD 11 설치하기  (0) 2015.06.30
댓글
«   2024/04   »
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
링크
공지사항
Total
Today
Yesterday