Submitted by Hal9000 on Fri, 03/09/2012 - 01:48
Suddenly (don't knof if since Virtualmin 3.90 or some kind of Debian PostgreSQL update) Virtualmin wrongly creates the usernames on PostgreSQL. My username schema is the domain name, so usenames should be like "domain.tld". However, it now creates "domain\.tld" and the domain fails validation in Virtualmin. Also, it gets errors when trying to disable or enable PostgreSQL for the domain, since it tries to delete "domain\\.tld" which it can't find, and then tries to create "domain\.tld" which still exists cause it wasn't deleted.
Status:
Closed (fixed)
Comments
Submitted by Hal9000 on Fri, 03/09/2012 - 01:50 Comment #1
Oh, btw I am also unable to delete the username from within the Webmin module. It tries to delete domain\\.tld instead of domain\.tld
Submitted by JamieCameron on Fri, 03/09/2012 - 17:48 Comment #2
This is a Virtualmin bug - it is doing un-necessary escaping for PostgreSQL users.
The fix (till the next release) is to edit
/usr/share/webmin/virtual-server/feature-postgres.pl
and change line 164 to :return """.$str.""";
then run
/etc/webmin/restart
Submitted by Hal9000 on Sat, 03/10/2012 - 04:35 Comment #3
Thanks, that fixed the username creation. However, I am still unable to delete the wrongly created user from the webmin module. When I select mydomain\.com and hit delete, I get the following error message:
Failed to delete users : SQL drop user "mydomain\\.com" failed : ERROR: role "mydomain\\.com" does not exist
so it looks like it's escaping there as well.Submitted by JamieCameron on Sat, 03/10/2012 - 12:13 Comment #4
That will be fixed in the next Webmin release..
Submitted by Issues on Sat, 03/24/2012 - 13:18 Comment #5
Automatically closed -- issue fixed for 2 weeks with no activity.