"리눅스 쉘 변경 chsh"의 두 판 사이의 차이

12번째 줄: 12번째 줄:
<source lang='dos'>
<source lang='dos'>
[root@localhost ~]# grep testuser /etc/passwd
[root@localhost ~]# grep testuser /etc/passwd
testuser:x:502:502::/home/testuser:/bin/bash
testuser:x:502:502::/home/testuser:/sbin/nologin
</source>
<source lang='dos'>
[root@localhost ~]# chsh testuser -s /bin/bash
[root@localhost ~]# chsh testuser -s /bin/bash
Changing shell for testuser.
Changing shell for testuser.
21번째 줄: 19번째 줄:
<source lang='dos'>
<source lang='dos'>
[root@localhost ~]# grep testuser /etc/passwd
[root@localhost ~]# grep testuser /etc/passwd
testuser:x:502:502::/home/testuser:/sbin/nologin
testuser:x:502:502::/home/testuser:/bin/bash
[root@localhost ~]# su - testuser
[testuser@localhost ~]$
</source>
</source>



2012년 11월 29일 (목) 19:50 판

change shell in linux; chsh
리눅스 계정 쉘 변경
리눅스 계정 쉘 권한 바꾸기

1 bash로 바꾸기

명령어
chsh 계정명 -s /bin/bash
실행예시
[root@localhost ~]# grep testuser /etc/passwd
testuser:x:502:502::/home/testuser:/sbin/nologin
[root@localhost ~]# chsh testuser -s /bin/bash
Changing shell for testuser.
Shell changed.
[root@localhost ~]# grep testuser /etc/passwd
testuser:x:502:502::/home/testuser:/bin/bash
[root@localhost ~]# su - testuser
[testuser@localhost ~]$

2 nologin으로 바꾸기

명령어
chsh 계정명 -s /bin/nologin
실행예시
[root@localhost ~]# grep testuser /etc/passwd
testuser:x:502:502::/home/testuser:/bin/bash
[root@localhost ~]# chsh testuser -s /sbin/nologin
Changing shell for testuser.
Shell changed.
[root@localhost ~]# grep testuser /etc/passwd
testuser:x:502:502::/home/testuser:/sbin/nologin
[root@localhost ~]# su - testuser
This account is currently not available.

3 같이 보기

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