Can't see other virtual hosts after importing a site [Solved]

(I have a Virtualmin 6.14 pro license) I read a post (https://www.virtualmin.com/node/53206) that talked about importing a Webmin-created site into Virtualmin, so that I could admin it the same as my other hosts (about five others) This seemed like a good idea, so I used the procedure, and all the host seem still to be working.

BUT... Webmin and Virtualmin no longer display information about any of the other hosts.

  • Webmin's Server -> Apache Webserver only shows information about the newly-imported site.

  • Virtualmin's dropdown (that formerly displayed the five other hosts), now only shows the newly-imported site.

  • The Dashboard for either (Webmin or Virtualmin) only shows Recent Logins and Virtual Server Information (for the newly-imported site).

How can I get back to the ability to administer all my hosts? Thanks.

Status: 
Closed (fixed)
Virtualmin version: 
6.14
Webmin version: 
1.970

Comments

Ilia's picture
Submitted by Ilia on Sun, 02/14/2021 - 09:37

Hi,

Thanks for contacting us.

That sound like an odd issue.

The Dashboard for either (Webmin or Virtualmin) only shows Recent Logins and Virtual Server Information (for the newly-imported site).

Go to Webmin > Webmin Users > username and check in Available Webmin Modules that Virtualmin Virtual Servers module is actually enabled.

What are your server specs and how much free resources do you have left (according to the Dashboard)?

Thanks for the speedy response. I can't get to the Webmin Users (see video below), but it's 4GByte Ubuntu 18.04 server. My hosting company's admin GUI shows that about 1/3 of the RAM and Disk are in use, so I don't think the server's under stress.

Here's a video of the state of the Webmin GUI: removed link to video

Other thoughts?

PS I am comfortable with SSH / command line, and can also look at raw data or make changes through vi/nano if necessary. Thanks again.

Also, make sure you're logged into Virtualmin as root and not as the domain owner.

Also, make sure you're logged into Virtualmin as root and not as the domain owner.

Ahah! That's a clue! When I was importing the domain, Virtualman asked something about whether I wanted a new user or an existing user to be an owner. I chose my sudo account name. I suspect the the imported domain has "captured" the GUI.

What's the best workaround?

  • Should I create another sudo account name and then sign into Webmin/Virtualmin using that? ("root" logins are disabled...)
  • Is there some way to change the owner name on that imported domain?
  • Or am I missing the point?

Thanks!

Joe's picture
Submitted by Joe on Sun, 02/14/2021 - 17:50 Pro Licensee

I chose my sudo account name. I suspect the the imported domain has "captured" the GUI.

That's it. Your admin account should never "own" a virtual server in Virtualmin (and Virtualmin should never let you do that...that's a bug, Jamie fixed it ages ago for root, but I guess sudo accounts aren't protected from this). Your admin account already has access to every domain, it doesn't make sense to turn it into a domain owner account. You generally want a new account for imported or migrated domains (unless you want them owned by an existing virtual server account). But you never want them owned root or whatever your root-like user is.

I don't know the best way to back out of this, maybe Jamie has a simple solution. Historically we'd tell you to hit the command line and re-enable all modules for this user in /etc/webmin/webmin.acl. Maybe there's a simpler way to do that.

I think we should wait on Jamie to follow up with the simplest path (and hopefully word that Virtualmin will have this bug fixed).

Thanks for pointing this out Joe - I'll prevent this in the next Virtualmin release.

The work-around for this existing domain is to just rename the admin user. SSH into the system as root and run virtualmin rename-domain --domain example.com --new-user somedifferentname

That isn't quite what I wanted... The command did rename the admin user, but now my sudo account has been changed from 'richb' to 'tmiuser', (see whoami below.)

I can still ssh into the host (as tmiuser), so I still have control of the server. But (obviously) I would like to get back to the previous state. Thoughts? Thanks.

sudo virtualmin rename-domain --domain testmyinter.net --new-user tmiuser
[sudo] password for richb:
Changing administration user to tmiuser ..
Modifying administration user ..
.. done

Updating aliases for contact address ..
.. done

Changing username in website configuration ..
.. done

Adding webserver user www-data to server's group ..
.. done

Renaming Webmin user ..
.. done

Updating paths in script database ..
.. done

Updating Webmin user ..
.. done

Applying web server configuration ..
.. done

Re-loading Webmin ..
.. done

Saving server details ..
.. done

richb@sea:/var/www/TestMyInter.net$ whoami
tmiuser

Update: I will await advice about putting this back to the previous state. Two new pieces of info (you will probably already have figured this out...)

1) My home directory is now owned by tmiuser:

ls -al /home
...
drwxr-xr-x 30 tmiuser             richb               4096 Feb 15 07:16 richb/
...

2) /etc/webmin/webmin.acl continues to show the root user with access to all the modules - the problem is that the richb user cannot log in right now because that account doesn't have a password or a sudo password...

sudo more webmin.acl
root: acl adsl-client ajaxterm apache at backup-config bacula-backup bandwidth bind8 burner cfengine change-u
ser cluster-copy cluster-cron cluster-passwd cluster-shell cluster-software cluster-useradmin cluster-usermin
 cluster-webmin cpan cron custom dfsadmin dhcpd dnsadmin dovecot exim exports fdisk fetchmail file filter fir
ewall frox fsdump grub heartbeat htaccess-htpasswd idmapd inetd init inittab ipfilter ipfw ipsec iscsi-client
 iscsi-server jabber krb5 ldap-client ldap-server ldap-useradmin lilo logrotate lpadmin lvm mailboxes mailcap
 majordomo man mon mount mysql net nis openslp package-updates pam pap passwd phpini postfix postgresql ppp-c
lient pptp-client pptp-server proc procmail proftpd pserver qmailadmin quota raid samba sarg sendmail sentry
servers shell shorewall shorewall6 smart-status smf software spam squid sshd status stunnel syslog-ng syslog
system-status tcpwrappers telnet time tunnel updown useradmin usermin vgetty webalizer webmin webmincron webm
inlog wuftpd xinetd iscsi-target fail2ban iscsi-tgtd firewalld filemin authentic-theme firewall6 virtual-serv
er virtualmin-nginx virtualmin-mailrelay virtualmin-notes virtualmin-sqlite virtualmin-mailman virtualmin-dis
able virtualmin-nginx-ssl virtualmin-oracle virtualmin-awstats virtualmin-registrar virtualmin-init virtualmi
n-styles-oswd virtualmin-signup virtualmin-iframe virtualmin-google-analytics virtualmin-vsftpd virtualmin-da
v virtualmin-slavedns virtualmin-password-recovery virtualmin-htpasswd virtualmin-messageoftheday virtualmin-
powerdns virtualmin-support virtualmin-git virtualmin-svn
anonymous: virtualmin-mailman virtualmin-password-recovery
tmiuser: apache virtual-server filemin passwd proc cron at telnet change-user htaccess-htpasswd

The simplest fix would be to create a new Unix user called "richb" , and make sure he's a member of the "wheel" group which allows use of sudo. This can be done at Webmin -> System -> Users and Groups.

Since the old user is still using the /home/richb home directory, you should select a different home dir for the new richb user though.

Hi Jamie, Thanks again for these speedy responses. I think I will adapt your advice to create a new deploy user. (I have been meaning to do for a while, anyway, since it means my official "admin" tasks are separated from any files in my personal account.) That is, I will:

  • create the new user with a new sudo password
  • set the rsa public key for that ssh login to use my current certificate (ssh-copy-id)
  • use that new user/password to log into webmin/virtualmin

I just did this, and I have full access to my Webmin/Virtualmin server. Thanks again!

Title: Can't see other virtual hosts after importing a site » Can't see other virtual hosts after importing a site [Solved]

Cool, glad it's fixed!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.