I have set up ldap on my local network following the Ubuntu Manual.

For some reason (after ldap setup, not before), it seems to have made a root entity in my ldap tree, which now allows for the availability of root logins. Why? I thought Ubuntu's whole deal was avoiding having a actual root login?

I found it very surprising when I went to work and tried to ssh into my home machine with the root account and supplying it a password worked.

  • Are you sure you didn't just create an LDAP account called root? Does it really have actual root permissions? – reverendj1 Sep 20 '12 at 14:11
  • I did not create a root ldap account, and yes it does have root perms... – dustin Sep 20 '12 at 14:37

To ensure that you really talking about root check the uid of the account. After login invoke id. The output should be:

uid=0(root) gid=0(root) groups=0(root)

root is just a name, the special rights belong to the uid 0.

If you have a 2nd account root with a "normal" uid different from 0 delete this bogus account.

If your root account has the uid 0 ensure that the sshd configuration deny root login. Ensure that /etc/ssh/sshd_config include the setting:

PermitRootLogin no

Note: Ubuntu has surely a root account. The difference to other distribution is, that normally no password is assigned to this account.

  • I have never had a root account working on ubuntu with out it causing massive issues.... I dont understand why all the sudden its now active and with a password.... I have removed the ability to log into it via ssh... the UID is 0 . I normally use sudo to become root, Now i feel like reinstalling linux because I dont know what else this has done... – dustin Sep 20 '12 at 14:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.