Permitir login com ROOT no Ubuntu 18.04 Bionic Beaver Linux
Embora seja altamente não recomendável, existem alturas que necessitamos de inicial uma sessão comum como ROOT. no entanto, esta opção vem desactivada.
Vamos então entender como activar ROOT para inicio de cessão.
Em primeiro lugar devemos criar esta excepção no ficheiro de configuração do gdm3.
Ao Abrir será possivel observar o ficheiro desta forma
zeus@ubuntu:~$ sudo nano /etc/gdm3/custom.conf # GDM configuration storage # # See /usr/share/gdm/gdm.schemas for a list of available options. [daemon] # Uncoment the line below to force the login screen to use Xorg #WaylandEnable=false # Enabling automatic login # AutomaticLoginEnable = true # AutomaticLogin = user1 # Enabling timed login # TimedLoginEnable = true # TimedLogin = user1 # TimedLoginDelay = 10 [security] [xdmcp] [chooser] [debug] # Uncomment the line below to turn on debugging # More verbose logs # Additionally lets the X server dump core if it crashes #Enable=true
Depois de [security] vamos adicionar “AllowRoot=true” como pode ver a baixo:
zeus@ubuntu:~$ sudo nano /etc/gdm3/custom.conf # GDM configuration storage # # See /usr/share/gdm/gdm.schemas for a list of available options. [daemon] # Uncoment the line below to force the login screen to use Xorg #WaylandEnable=false # Enabling automatic login # AutomaticLoginEnable = true # AutomaticLogin = user1 # Enabling timed login # TimedLoginEnable = true # TimedLogin = user1 # TimedLoginDelay = 10 [security] AllowRoot=true [xdmcp] [chooser] [debug] # Uncomment the line below to turn on debugging # More verbose logs # Additionally lets the X server dump core if it crashes #Enable=true
Salve agora o ficheiro. com a combinação de teclas “Ctrl” + “X” seguindo “y” para confirmar.
Vamos agora editar gdm-password
sudo nano /etc/pam.d/gdm-password #%PAM-1.0 auth requisite pam_nologin.so auth required pam_succeed_if.so user != root quiet_success @include common-auth auth optional pam_gnome_keyring.so @include common-account # SELinux needs to be the first session rule. This ensures that any # lingering context has been cleared. Without this it is possible # that a module could execute code in the wrong domain. session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so close session required pam_loginuid.so # SELinux needs to intervene at login time to ensure that the process # starts in the proper default security context. Only sessions which are # intended to run in the user's context should be run after this. session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so open session optional pam_keyinit.so force revoke session required pam_limits.so session required pam_env.so readenv=1 session required pam_env.so readenv=1 user_readenv=1 envfile=/etc/default/locale @include common-session session optional pam_gnome_keyring.so auto_start @include common-password
Vamos comentar a linha que contem auth required pam_succeed_if.so user != root quiet_success
Ficará algo do genero:
sudo nano /etc/pam.d/gdm-password #%PAM-1.0 auth requisite pam_nologin.so #auth required pam_succeed_if.so user != root quiet_success @include common-auth auth optional pam_gnome_keyring.so @include common-account # SELinux needs to be the first session rule. This ensures that any # lingering context has been cleared. Without this it is possible # that a module could execute code in the wrong domain. session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so close session required pam_loginuid.so # SELinux needs to intervene at login time to ensure that the process # starts in the proper default security context. Only sessions which are # intended to run in the user's context should be run after this. session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so open session optional pam_keyinit.so force revoke session required pam_limits.so session required pam_env.so readenv=1 session required pam_env.so readenv=1 user_readenv=1 envfile=/etc/default/locale @include common-session session optional pam_gnome_keyring.so auto_start @include common-password
Salve agora o ficheiro. com a combinação de teclas “Ctrl” + “X” seguindo “y” para confirmar.
Reinicie agora o sistema e deverá agora conseguir iniciar uma sessão como ROOT.
Pode sempre contribuir em:
ETH: 0x222F6EdC8Ed1997dfD787Cf2af32a17d17e944EC
BTC: 1J4eCzthfyTZT39RhFsg2bmrmfAG2dZcV5