How to Login to Ubuntu as Root User? Como Entrar para o Ubuntu como usuário root?

At times where Linux provides a secure and healthy environment for users, it makes other things even more complicated and intricate. Às vezes, onde o Linux oferece um ambiente seguro e saudável para os usuários, faz outras coisas ainda mais complicadas e complexas. Despite being such a user-friendly operating system, it is not that easy to login to Ubuntu as a root user. Apesar de ser um usuário como um sistema operacional amigável, não é assim tão fácil de login do Ubuntu como usuário root.

Root user has all the administrator privileges so whenever you need to edit system files or configuration from within Gnome, you will feel the need to login to Ubuntu as a root user. Usuário root tem todos os privilégios de administrador para que sempre que você precisa para editar arquivos do sistema ou a configuração dentro do Gnome, você vai sentir a necessidade de login do Ubuntu como usuário root. But the question is here is "How to login to Ubuntu as a root user?" Mas a questão é aqui é "Como fazer login para Ubuntu como usuário root?"

Just follow the steps below: Basta seguir os passos abaixo:

  1. Open the terminal and type: Abra o terminal e digite:
    sudo passwd root
  2. When you see the prompt that says "Enter new UNIX password", enter the password you want for the root user and confirm it. Quando você vê o prompt que diz "Enter new UNIX password", digite a senha que você deseja para o usuário root e confirmá-la.
  3. Type: Tipo:
    sudo gedit /etc/X11/gdm/gdm.conf
  4. Locate the line that says "AllowRoot=false". Localize a linha que diz "AllowRoot = false". Change it to "AllowRoot=true". Alterá-lo para "AllowRoot = true".
  5. Save the file Salve o arquivo
  6. Exit gedit, logout and then reboot. Gedit Sair, sair e depois reiniciar.

I used the same method when I wanted to login as root user to edit configuration files of my graphics card and everything worked great. Eu usei o mesmo método quando eu quis fazer o login como usuário root para editar arquivos de configuração da minha placa gráfica e tudo funcionou muito bem. However the only issue in this case is that by logging to Ubuntu as root you are making your operating system more vulnerable. No entanto o único problema neste caso é que, entrando para o Ubuntu como root você está fazendo o seu sistema operativo mais vulnerável.

For Ubuntu users it is recommended to use the account which they created on time of install and use the "sudo" command while in terminal to execute commands as root user. Para usuários do Ubuntu, recomenda-se usar a conta que criou na hora de instalar e usar o "sudo" comando enquanto no terminal para executar comandos como usuário root.

  • Bad bad bad idea, really. Bad má idéia ruim, realmente.

    Never run X with root's power, there isn'ta reason to do that. Nunca execute X com o poder do root, lá não é motivo para fazer isso. If you need to configure something as root-root use sudo properly: 'sudo -i' Se você precisar configurar algo como root sudo usar raiz corretamente: "sudo-i '
  • Mike Mike
    I aggree that you should not login to X as root. Eu aggree que você não deve fazer o login para o X como root. But Ubuntu style to use sudo is very bad bad bad idea too. Mas o estilo Ubuntu para usar o sudo é muito ruim má idéia muito ruim. If you always login using user who has sudo rights it's even more dangerous than to login as a root. Se você sempre usando o login do usuário que tenha direitos de sudo é ainda mais perigoso do que fazer o login como root.
  • Michael Michael
    You say to edit the gdm.conf file to allow root log in. Well you can edit the "Log In Window" settings under the System > Administration menu you to do this easier. Você diz para editar o arquivo gdm.conf permitir log raiz dentro Bem, você pode editar o registo "na janela" Configurações no âmbito do Sistema> Administração menu que você faça isso mais fácil. Under the "Security" tab enable "Allow local system administrator log in". Sob a guia "Segurança" activar "Permitir logon local administrador sistema".
  • boss boss
    I agree with Michael's idea Eu concordo com a idéia de Michael
    It worked. Funcionou.
  • Matthew Mateus
    Actually thanx a lot Michael...my linux system stuck and I couldn't install nothing...now its cool :D Na verdade thanx a lot Michael ... meu sistema linux preso e eu não conseguia instalar nada ... agora o seu cool: D
  • jason jason
    I tried this but sudo gedit /etc/X11/gdm/gdm.conf just opens a blank page with no text ??? Eu tentei isso, mas gedit etc/X11/gdm/gdm.conf / só abre uma página em branco, sem texto??
  • r jesse R jesse
    hi Jason oi Jason
    i tried sudo gedit /etc/X11/gdm/gdm.conf and it didnt work for me either! Eu tentei sudo gedit / etc/X11/gdm/gdm.conf e ele didnt trabalho para mim também! BUT: there is a better way to just do that! MAS: não há uma maneira melhor de fazer apenas isso! guess what: go to prompt and type: adivinhe: ir para o prompt e digite:

    $locate gdm.conf $ localizar gdm.conf

    where you will get something like: onde você terá algo como:

    /etc/gdm/gdm.conf / etc / gdm / gdm.conf
    /etc/gdm/gdm.conf-custom / etc / gdm / gdm.conf-custom
    /etc/gdm/gdm.conf~ / etc / gdm gdm.conf / ~
    ...etc etc ...

    to me the above was my output. para mim o supra foi minha saída.

    this gives you a whole lots of locations where files with name *like* gdm.conf can be found. Isto dá-lhe um conjunto de lotes locais onde os arquivos com o nome de * como * gdm.conf pode ser encontrado. THIS IS THE FILE WE NEED TO EDIT. ESTA É A NOSSA IMAGEM precisa editar.

    you can tell from the listing that the first option is the one we r after (or it depends on your output but look for EXACTLY "gdm.conf" file), so you can go for you gedit command now: remove the /X11/ and type it like: você pode dizer a partir do anúncio de que a primeira opção é o um r que depois (ou isso depende da sua saída, mas procurar EXATAMENTE gdm.conf "arquivo"), assim você pode ir para você gedit comando agora: remover o X11 / / e digitá-lo como:

    sudo gedit /etc/gdm/gdm.conf sudo gedit / etc / gdm / gdm.conf

    ..there we r... .. lá nós r. ..

    r jesse R jesse
    Dar. Dar.
  • Sus Sus
    Michael Michael
    April 20, 2008 at 6:51 pm 20 de abril de 2008 às 6:51 pm

    You say to edit the gdm.conf file to allow root log in. Well you can edit the “Log In Window” settings under the System > Administration menu you to do this easier. Você diz para editar o arquivo gdm.conf permitir log raiz dentro Bem, você pode editar o registo "na janela" Configurações no âmbito do Sistema> Administração menu que você faça isso mais fácil. Under the “Security” tab enable “Allow local system administrator log in”. Sob a guia "Segurança" activar "Permitir logon local administrador sistema".
  • Itchyfinger Itchyfinger
    I wish people would get the facts straight before they go bleeting one way or the other on how something impacts Ubuntu system security, because it's important for all users, new and old, to know the straight dope. Gostaria que as pessoas começariam a verdade dos factos antes de ir bleeting uma forma ou de outra sobre como algo impactos de segurança do sistema Ubuntu, porque é importante para todos os usuários novos e antigos, para saber o Straight Dope. Not only do they need it explained in non-superstitious terms what they can and can't do while logged in as user or root, but they need better justification for the restrictions in play. Não só eles precisam ter explicado em termos não-supersticioso que eles podem e não podem fazer enquanto estiver conectado como usuário ou root, mas eles precisam de uma melhor justificação para as restrições em jogo. It takes this sort of review process to perfect a system, and the perfect system is NOT the most secure one - fact is that the most secure system is also the most useless. É preciso este tipo de processo de revisão para aperfeiçoar um sistema, eo sistema perfeito não é o mais seguro - o facto é que o sistema mais seguro é também o mais inútil.

    While I know only a little myself, being a fairly new user, I went and tried tried the first fix before forming my opinion! Embora eu saiba só um pouco de mim mesmo, de ser um usuário relativamente novo, eu fui e tentei tentei a primeira posição antes de formar a minha opinião! The result is that I no longer get some asinine hassle when I want to browse partitions which are BY DEFAULT less security-sensitive than my system partition, and since you don't need root priveleges to write to your system partitions in Ubuntu (not so with other distros), Then I want to know what were you Ubuntu Engineers thinking in making an issue of browsing secondary partitions? O resultado é que eu já não obter algum aborrecimento asinino quando eu quiser navegar partições que são, por padrão de segurança menos sensível do que a minha partição do sistema, e desde que você não precisa de privilégios de root para gravar em partições de seu sistema no Ubuntu (não tão com outras distros), então eu quero saber o que você estava Ubuntu Engenheiros pensando em fazer uma emissão de partições navegação secundária?

    Anyway, despite being able to browse your own files while logged in as root, you still can't change your system files without the sudo command - I tried that, and it won't let me. Enfim, apesar de ser capaz de procurar seus próprios arquivos enquanto estiver conectado como root, você ainda não pode mudar seus arquivos de sistema sem o comando sudo - Eu tentei isso, e ele não me deixa. Very strange, but that's how it works. Muito estranho, mas é assim que ele funciona.
  • Itchyfinger Itchyfinger
    In summary (see above), total write-access does not exist any more (or any less) between a logged-in user and logged-in root user without the use or the sudo command, and then the only thing which non-root-user-status can make particularly difficult is access to partitions not containing his system (unless of course the system is on a separate partition from his home directory). Em resumo (veja acima), o total de acesso de gravação não existe mais (nem menos) entre um usuário conectado e logado como root, sem a utilização ou o comando sudo, e então a única coisa que não-raiz -user-estado pode tornar particularmente difícil é o acesso a partições que não contenham o seu sistema (a não ser, claro, o sistema está em uma partição separada de seu diretório home).
blog comments powered by Disqus blog comentários powered by Disqus