시스템/서버

우분투18.04 root 로그인

비니화이팅 2018. 10. 27. 23:15
우분투에서는 보안상 디폴트로 root 로그인이 불가능합니다.

불편하니 root 로그인이 가능하게 설정해줍시다!!



우선 root패스워드를 설정합니다.

1
sudo passwd root
cs


로그인 잠금을 해제(unlock) 합니다.

1
sudo passwd -u root
cs


/etc/gdm3/custom.conf 파일의 [security]밑에 AllowRoot = true를 추가해줍니다.

1
2
3
4
/etc/gdm3/custom.conf
#####################
[security]
AllowRoot = true
cs


/etc/pam.d/gdm-password 파일에서 다음을 주석처리합니다.

1
2
3
/etc/pam.d/gdm-password
##################################################################
# auth required       pam_succeed_if.so user! = root quiet_success
cs


/root/.profile 파일에 아래의 내용을 추가해줍니다.

1
2
3
4
5
/root/.profile
##################
if `tty -s`; then
   mesg n
fi
cs