Disable Root - WebMin LogIn

4 posts / 0 new
Last post
#1 Sun, 11/30/2014 - 19:57
katir

Disable Root - WebMin LogIn

I plan to disable root log in (duh! should have done this a long time ago)

I've also been logging into my control panel with the root log in. How do I assign full VirtualMin and WebMin privileges to a different user?

I couldn't find this in the docs and searched for "disable root login" and did not find anything.

Thanks!

Fri, 12/05/2014 - 14:27
scotwnw

Works like this on Ubuntu, Via command line, create a new sudo user. That user can then login to webmin with all privileges. Once confirmed that you can login to webmin with new name, remove root password via command line or disable root login via webmin.

Fri, 12/05/2014 - 20:27
katir

I'm on CentOS

What I decided to do, after a lot of study, was enable (uncomment) the line in sudoers that grants all privileges for group "wheel". This way I was able to then simply do:

usermod -G wheel someUser

and then that user is able to both su and also sudo and stay in his shell. I tested this and it works and I then turned off root login from the webmin web GUI (I was getting nervous editing core files by hand! I would have use the GUI to also edit sudoers but I not grok how...)

Enabling group "wheel" and then adding users seems to be the more standard "best" practice.

Now if I try to log in remotely as root, I was expecting some kind of "you are blocked" message... instead the server simply asks for a password and even if I give the correct password, it returns "Permission Denied." So I presume that is the expected behavior if root login is set to "NO"

So far so good I did not break my server (ha!)

Then, taking your cue I tried to enter "someUser" (who now has sudo rights by virtue of being a part of group "wheel") into the Webmin login and entered the correct password. But WebMin will not allow it. But, I can still log in to WebMin root. One of my team (with more training than me at this level) said that WebMin's login is not related to the root login.

So I did disable root log in, users I trust can sudo, but webmin still wants root to get in. i think I must be very close...

Mon, 09/14/2015 - 15:15
bbuhlman

I know this is an old thread but was a way ever discovered to disable root user and still login to WebMin/VirtualMin and sudo to root? I'm on CentOS

Topic locked