Showing results for 
Search instead for 
Did you mean: 


sandeep mathur
Respected Contributor


how to deny root login in linux
Steven Schweda
Honored Contributor

Re: linux

Once again, a completely useless Subject.

_Why_ would you wish to do this?

Ask someone else to set the root password for
you, and then not tell you what it is?
Esteemed Contributor

Re: linux

Disabling root login can have some undesirable effects. I have run into problems in Ubuntu, since it by default has a disabled root account.

If you still wish to disable root login, you need to edit /etc/shadow.

The entry for root would be like (for e.g.):

You need to replace the string between the first colon & the second colon. In above example change $1xxxx with * so it looks like:

Be careful not to edit / erase any other strings. Root user is most integral part of a Linux / Unix system & should not be messed with in my opinion. :)
dirk dierickx
Honored Contributor

Re: linux

i would like to know which problems you had on ubuntu with the disabled root account.

better question to ask is how to deny remote root logins. i don't think root should be disabled in total though.
sachin samartha
Occasional Visitor

Re: linux

hi i dint get....what your telling......

why do you want to deny root........????
D Block 2
Respected Contributor

Re: linux


gedit /etc/ssh/sshd_config
PermitRootLogin no

service sshd restart
Golf is a Good Walk Spoiled, Mark Twain.