1825576 Members
1953 Online
109682 Solutions
New Discussion

Re: linux

 
sandeep mathur
Respected Contributor

linux

how to deny root login in linux
5 REPLIES 5
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?
~sesh
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.):
root:$1xxxx:1234:344:0:::

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

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
New Member

Re: linux

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

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

Re: linux

SSH ?

gedit /etc/ssh/sshd_config
PermitRootLogin no

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