How to Login to Ubuntu as Root User? Hoe in te loggen om Ubuntu als root gebruiker?

At times where Linux provides a secure and healthy environment for users, it makes other things even more complicated and intricate. In tijden waarin Linux biedt een veilige en gezonde omgeving voor de gebruikers, andere dingen maakt het nog gecompliceerder en ingewikkeld. Despite being such a user-friendly operating system, it is not that easy to login to Ubuntu as a root user. Ondanks het feit dat een dergelijke gebruiksvriendelijk besturingssysteem, is het niet zo makkelijk om in te loggen om Ubuntu als root gebruiker.

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. Root-gebruiker heeft alle beheerdersrechten, zodat wanneer u maar wilt systeem configuratie bestanden of bewerken van binnen Gnome, zult u de behoefte voelen om in te loggen om Ubuntu als root gebruiker. But the question is here is "How to login to Ubuntu as a root user?" Maar de vraag is hier "Hoe in te loggen om Ubuntu als root gebruiker?"

Just follow the steps below: Volg de onderstaande stappen:

  1. Open the terminal and type: Open de terminal en type:
    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. Wanneer u de prompt die zegt "Enter new UNIX wachtwoord", voer het wachtwoord dat u wilt voor de root gebruiker en te bevestigen.
  3. Type: Type:
    sudo gedit /etc/X11/gdm/gdm.conf
  4. Locate the line that says "AllowRoot=false". Zoek de regel die zegt "AllowRoot = false". Change it to "AllowRoot=true". Verander dit in "AllowRoot = true".
  5. Save the file Sla het bestand op
  6. Exit gedit, logout and then reboot. Exit gedit, uitloggen en dan opnieuw opstarten.

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. Ik gebruikte dezelfde methode als ik wilde inloggen als root-gebruiker om configuratie bestanden bewerken van mijn grafische kaart en alles werkte prima. However the only issue in this case is that by logging to Ubuntu as root you are making your operating system more vulnerable. Maar het enige probleem in deze zaak is dat door in te loggen om Ubuntu als root u het maken van uw besturingssysteem kwetsbaarder.

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. Voor de Ubuntu gebruikers is het aanbevolen om de rekening die zij gemaakt op moment van installeren en de "sudo gebruik", terwijl in opdracht terminal commando's als root gebruiker uit te voeren gebruiken.

  • Bad bad bad idea, really. Slecht slecht slecht idee, eigenlijk.

    Never run X with root's power, there isn'ta reason to do that. Nooit run X met macht wortel, er is geen reden om dat te doen. If you need to configure something as root-root use sudo properly: 'sudo -i' Als u iets moet configureren als root-root gebruik sudo behoren: 'sudo-i'
  • Mike Mike
    I aggree that you should not login to X as root. Ik aggree dat je niet moet inloggen op X als root. But Ubuntu style to use sudo is very bad bad bad idea too. Maar Ubuntu stijl te gebruiken sudo is zeer slecht slecht slecht idee ook. If you always login using user who has sudo rights it's even more dangerous than to login as a root. Als u altijd inloggen met gebruiker met sudo rechten is het zelfs gevaarlijker dan in te loggen als 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. U zegt het gdm.conf naar root bestand te bewerken aanmelden toestaan inch Nou je de "Log In Window kunt bewerken 'instellingen in het System> Administration menu dat u om dit gemakkelijker te doen. Under the "Security" tab enable "Allow local system administrator log in". Onder het tabblad 'Beveiliging' in staat 'Toestaan lokale systeembeheerder in te loggen.
  • boss baas
    I agree with Michael's idea Ik ben het eens met de idee van Michael
    It worked. Het werkte.
  • Matthew Matthew
    Actually thanx a lot Michael...my linux system stuck and I couldn't install nothing...now its cool :D Eigenlijk thanx a lot Michael ... mijn linux systeem vast en kon ik niet installeren niets ... nu zijn cool: D
  • jason jason
    I tried this but sudo gedit /etc/X11/gdm/gdm.conf just opens a blank page with no text ??? Ik probeerde dit maar sudo gedit / etc/X11/gdm/gdm.conf gewoon opent een lege pagina zonder tekst??
  • r jesse r jesse
    hi Jason hi Jason
    i tried sudo gedit /etc/X11/gdm/gdm.conf and it didnt work for me either! Ik probeerde sudo gedit / etc/X11/gdm/gdm.conf en didnt work for me either! BUT: there is a better way to just do that! MAAR: er is een betere manier om gewoon doen! guess what: go to prompt and type: wat denk je: ga naar prompt en type:

    $locate gdm.conf $ locate gdm.conf

    where you will get something like: waar krijg je zoiets als:

    /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. voor mij het bovenstaande was mijn output.

    this gives you a whole lots of locations where files with name *like* gdm.conf can be found. dit geeft je een heel veel plaatsen waar bestanden met de naam * als * gdm.conf kan worden gevonden. THIS IS THE FILE WE NEED TO EDIT. Dit is het bestand WE moet bewerken.

    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: kunt zien aan de vermelding dat de eerste optie is een we r na (of het hangt af van uw output, maar op zoek naar exact "gdm.conf"-bestand), dus je kunt gaan voor je commando gedit nu: verwijder de / X11 / en typ het als:

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

    ..there we r... .. daar zijn we r. ..

    r jesse r jesse
    Dar. Dar.
  • Sus Sus
    Michael Michael
    April 20, 2008 at 6:51 pm 20 april 2008 at 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. U zegt het gdm.conf bestand te bewerken naar root aanmelden toestaan inch Nou je de "Log In Window kunt bewerken 'instellingen in het System> Administration menu dat u om dit gemakkelijker te doen. Under the “Security” tab enable “Allow local system administrator log in”. Onder het tabblad 'Beveiliging' in staat 'Toestaan lokale systeembeheerder in te loggen.
  • 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. Ik zou willen dat mensen de feiten recht voor ze gaan bleeting een of andere manier iets over de wijze waarop de effecten Ubuntu veiligheid van het systeem te krijgen, omdat het belangrijk is voor alle gebruikers, nieuwe en oude, aan de rechte dope weten. 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. Niet alleen doen ze het nodig hebben uitgelegd in termen van niet-bijgelovig wat ze wel en niet kunnen doen, terwijl in ingelogd als gebruiker of root, maar ze moeten een betere rechtvaardiging voor de beperkingen die in het spel. 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. Hij neemt dit soort herziening van een systeem te perfectioneren, en de perfecte systeem is niet de meest veilige is - is een feit dat de meest veilige systeem is ook het meest nutteloos.

    While I know only a little myself, being a fairly new user, I went and tried tried the first fix before forming my opinion! Hoewel ik weet alleen een beetje mezelf, zijnde een vrij nieuwe gebruiker, ging ik probeerde en probeerde de eerste fix voor het vormen van mijn mening! 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? Het resultaat is dat ik niet meer krijgen sommige stompzinnige gedoe wanneer ik wil partities bladeren die worden standaard beveiliging minder gevoelig dan mijn systeem partitie, en aangezien u niet hoeft root-rechten te schrijven aan uw systeem partities in Ubuntu (niet zo met andere distributies), Dan wil ik weten wat waren je Ubuntu Ingenieurs denken bij het maken van een kwestie van browsen secundaire partities?

    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. Hoe dan ook, ondanks de mogelijkheid om uw eigen bestanden bladeren terwijl ingelogd als root, je nog niet kunt uw systeem bestanden wijzigen zonder de sudo commando - probeerde ik dat, en het zal mij niet laten. Very strange, but that's how it works. Heel vreemd, maar dat is hoe het werkt.
  • 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). In de samenvatting (zie hierboven), totaal write-toegang niet meer (of minder) tussen bestaat een ingelogde gebruiker en ingelogde root gebruiker zonder het gebruik of de sudo commando, en dan is het enige dat niet-root -user-status kan maken bijzonder moeilijk is de toegang tot partities niet met zijn systeem (tenzij natuurlijk het systeem is op een aparte partitie van zijn home-directory).
blog comments powered by Disqus blog comments powered by Disqus