How to reactivate webmin login module

I accidentally deactivate webmin login module and now i cant access the webmin admin page. How can i reactivate this module using ssh?

I’m not sure what you’re saying you did. There is no “Webmin login module” that you could possibly deactivate. :wink:

What exactly did you do to lock yourself out? (That’ll determine what you need to do to get back in.)

If you just stopped the Webmin service…start it again. Since you haven’t mentioned your OS, it’s hard to tell you even how to do that, but “/etc/init.d/webmin restart” would be a good guess for the majority of systems.

Otherwise, you’ve gotta give us more to go on.

Thanks, i try but think is not that. I find a script folder and try this:
Code Description Enabled

unix Administration user Auto
dir Home directory Auto
mail Mail for domain No
dns BIND DNS domain Yes
web Apache website Yes
webalizer Webalizer reporting Yes
ssl SSL website Off
logrotate Log file rotation Auto
mysql MySQL database Yes
postgres PostgreSQL database No
ftp ProFTPd server Off
spam Spam filtering Yes
virus Virus filtering Yes
webmin Webmin login No
virtualmin-awstats AWstats reporting Yes
virtualmin-svn Subversion repositories Yes

I find script to but this dont have an option to enable the Webmin login. There is some way to enable this?

Ah, I see. Kind of.

So, you can still login to Webmin as root, then? (Since we’re clearly talking about a virtual server owner account, rather than root.)

If you can, login to Webmin as root, select the effected virtual server in the dropdown list, and click Edit Virtual Server. In the Enabled Features section, check the box next to "Webmin login enabled?"

But all this talk of ssh and scripts leads me to believe you can’t even login as root? How does that happen? root would never need to “own” a virtual server since it “owns” everything on the server. But, if you somehow made root into the owner of a virtual server and then disabled the login, you have more work to do than merely enabling the Webmin login (because if you’ve done that, you’ve stripped root of all “root” powers in Webmin, and gave him only the powers that the one virtual server owner would have…which is useless for a root-level user).

So, if that’s the case and you can’t login as root, you need to recreate the root Webmin user, and grant it all access. That’s a pretty complicated process, unfortunately. But, here’s what you do:

cd /etc/webmin
vi miniserv.users

Add a line like this:


Save it.

Edit webmin.acl, and add a line like this (or modify the existing one, if a root: line already exists):

root: backup-config change-user usermin virtualmin-notes webminlog webmin servers acl bacula-backup init passwd quota mount fsdump inittab ldap-client ldap-useradmin logrotate mailcap mon pam proc at cron sentry software desktop man syslog syslog-ng useradmin virtualmin-init security-updates exim virtualmin-awstats apache bind8 pserver dhcpd dovecot fetchmail frox jabber ldap-server majordomo mysql openslp postfix postgresql proftpd procmail qmailadmin mailboxes sshd samba sendmail spam squid sarg virtualmin-google-analytics virtualmin-mailman virtualmin-svn virtual-server wuftpd webalizer adsl-client bandwidth xinetd ipsec inetd krb5 firewall exports nis net pap ppp-client pptp-client pptp-server stunnel shorewall virtualmin-registrar idmapd filter burner grub lilo raid lvm fdisk lpadmin smart-status time vgetty cluster-passwd cluster-copy cluster-cron cluster-shell cluster-software cluster-usermin cluster-useradmin cluster-webmin cfengine heartbeat shell custom extjs file tunnel phpini cpan htaccess-htpasswd telnet status updown virtualmin-dav virtualmin-htpasswd virtualmin-slavedns translator server-manager virtual-server-gpl nettools php-pear ruby-gems virtual-server-svn dfsadmin dnsadmin ipfilter ipfw smf virtualmin-oracle virtualmin-mysqluser virtualmin-signup

That should be all on one line.

Once that’s done, I think the best way to correct all of the other limitations is to delete all root.acl files in all subdirectories:

rm */root.acl

There may be more restrictions in place…but I’m not thinking of it at the moment.

You’ll also need to restart Webmin, I think, to reload the user data.

And, don’t ever try to make your root user “own” some specific thing again, because he already owns everything…if you “give” him a virtual server, all it does it strip him of all of his powers! :wink:

Hi Joe,
I try all you say but nothing works.

Yesterday i was in virtuamin changing default and active modules to do a more restrictive police to all virtual servers. I deactivate email server(i dont need), maillist and webmin. After confirm the webmin page ( stop work. I dont have access to admin page since this but all rest is working.

Before make changes i see in miniserv.users the root line and in webmin.acl to. I search for root.acl but i dont have this file.

Yesterday when i see in virtualmin this module selection page i think that disabling the webmin login module i was disabling only the virtual servers users o log into admin page.

There are some file with all module configuration if its active and if is default? There is some way to resintall webmin/virtualmin without loose all acounts?

There are some file with all module configuration if its active and if is default? There is some way to resintall webmin/virtualmin without loose all acounts?

No! Stop right there. Whenever the word “reinstall” enters your mind, I assure you it is almost certainly wrong. Chase it away with a big stick, and don’t let it back inside.

First up, answer some of the questions I asked you. Don’t try advice blindly–I’m asking questions about the state of your system so I can understand what the problem is. I still do not know anything about the state of your system.

Did you create a virtual server owned by "root"?

And then you disabled the Webmin login for the root user?

No, each new virtual server got the default new user with same name.In miniserv.users i can see all users.

I was using the root user to add all virtual servers and making configurations. How my server only have me as real user i think close some unused services. So in virtualmin admin area i deactivate the webmin login(i put unchecked to use this service as default and to deactivate this service) then i confirm. Imediate the admin site stop respond.

Imediate the admin site stop respond.

Oh! This is a completely different problem. Why are you worrying over logins when there isn’t even a Webmin to login to??? That makes no sense. :wink:

So, what happened when you tried to restart Webmin earlier in this drama? Did you get any errors?

Try restarting again…this time make sure any old Webmin instances are killed off:

/etc/init.d/webmin stop
/etc/init.d/usermin stop
killall perl
/etc/init.d/usermin start
/etc/init.d/webmin start

Look in the Webmin log, found in /var/webmin/miniserv.error. Any problems? (A PAM module error is fine. But, anything else is worth noting.)