您好,登錄后才能下訂單哦!
本篇內(nèi)容主要講解“怎么解除Ubuntu18.04.1 root登錄圖形界面的限制”,感興趣的朋友不妨來看看。本文介紹的方法操作簡單快捷,實(shí)用性強(qiáng)。下面就讓小編來帶大家學(xué)習(xí)“怎么解除Ubuntu18.04.1 root登錄圖形界面的限制”吧!
1. 為root設(shè)置初始密碼
(1)普通用戶登錄系統(tǒng),打開終端,輸入 命令 :sudo passwd root(使用root權(quán)限為root更改密碼)
(2)設(shè)置root密碼;
(3)重復(fù)root密碼;
Jaking@ubuntu:~$ sudo passwd root [sudo] password for uplooking: Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Jaking@ubuntu:~$ su - root Password: root@ubuntu:~#
2. 修改/usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf文件內(nèi)容
vim /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf 打開文件,在文件尾加入兩行: greeter-show-manual-login=true all-guest=false root@ubuntu:~# cat /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf [Seat:*] user-session=ubuntu greeter-show-manual-login=true all-guest=false
3. 進(jìn)入/etc/pam.d文件夾下,修改gdm-autologin和gdm-passwd文件內(nèi)容
gdm-autologin文件注釋掉auth required pam_success_if.so user!=root quiet_success 這一行 gdm-password文件注釋掉auth required pam_success_if.so user!=root quiet_success 這一行 root@ubuntu:~# cd /etc/pam.d root@ubuntu:/etc/pam.d# cat gdm-autologin | grep auth auth requisite pam_nologin.so #auth required pam_succeed_if.so user != root quiet_success auth optional pam_gdm.so auth optional pam_gnome_keyring.so auth required pam_permit.so root@ubuntu:/etc/pam.d# cat gdm-password | grep auth auth requisite pam_nologin.so #auth required pam_succeed_if.so user != root quiet_success @include common-auth auth optional pam_gnome_keyring.so
4. 修改/root/.profile文件
將 mesg n 改為 tty -s && mesg n root@ubuntu:~# cat /root/.profile # ~/.profile: executed by Bourne-compatible login shells. if [ "$BASH" ]; then if [ -f ~/.bashrc ]; then . ~/.bashrc fi fi tty -s && mesg n || true
5. 重啟Ubuntu,用root登錄系統(tǒng)
到此,相信大家對“怎么解除Ubuntu18.04.1 root登錄圖形界面的限制”有了更深的了解,不妨來實(shí)際操作一番吧!這里是億速云網(wǎng)站,更多相關(guān)內(nèi)容可以進(jìn)入相關(guān)頻道進(jìn)行查詢,關(guān)注我們,繼續(xù)學(xué)習(xí)!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。