Plesk User Muddle After Migration

7 posts / 0 new
Last post
#1 Sun, 10/09/2011 - 08:12
PaliGap

Plesk User Muddle After Migration

I have just imported a server from Plesk 9. Mostly this works OK - but in this case I think I have a user muddle.

The new virtual server uses "user@domain" format to match that of Plesk. On the Plesk setup there was a mail account called "steven@domain.com" and a MySQL user "steven".

After import, I find that if I try to access Usermin for "steven@domain.com" I get this error: "Failed to create /home/domain.com/homes/steven/.usermin/mailbox : Permission denied"

If I do "validate server" I get: "Mail for domain : Home directory /home/domain.com/homes/steven for user steven@domain.com is owned by steven"

However if I login as Steve (the MySQL user) to Usermin, that's OK and I see "steven@domain.com"s mail box!

If I look at Webmin>>system>>users & groups I see these users:

steven 790 domain.com MySQL user /home/domain.com/homes/steven /dev/null

steven7495 735 domain.com MySQL user /home/domain.com/homes/steven7495 /dev/null

steven-domain.com 788 domain.com /home/domain.com/homes/steven /dev/null

steven@domain.com 788 domain.com /home/domain.com/homes/steven /dev/null

So we have 4 users. But should three users share the same home directory?

How can I fix it with the least disruption for the end user? I'd prefer it if he did not have to alter his email login settings, or his web site's PHP MySQL login access.

If I look at the directories, I see that "/home/domain.com/homes/steven" exists and is owned by "steven domain.com". I tried changing that to "steven@domain.com domain.com" (recursively). That DID allow me to get into Usermin. But then I got "Error with POP login" in red ink on the page!

Sun, 10/09/2011 - 16:49
andreychek

Howdy,

So, was there actually a system user named "steven" on your Plesk server?

If not, I wonder if Virtualmin was trying to import your MySQL user and your email user, each of which should be completely separate -- but inadvertently created a username clash.

-Eric

Sun, 10/09/2011 - 17:51
PaliGap

Yes, I think so. It seems there is a username clash after VM migrate.

Is there any way to fix it?

Sun, 10/09/2011 - 18:55
andreychek

Hmm... well, I don't think it'd be a good idea to delete that user, as it may also delete the home directory.

However, you could always try setting the permissions of that homedir so that it's owned by the user you're using... something like this:

chown -R steven-domain.com:steven-domain.com /home/domain.com/homes/steven

Since you don't need the "steven" user, there shouldn't be a problem in doing the above.

-Eric

Mon, 10/10/2011 - 05:19
PaliGap

Eric - you know I tried that!

"If I look at the directories, I see that "/home/domain.com/homes/steven" exists and is owned by "steven domain.com". I tried changing that to "steven@domain.com domain.com" (recursively). That DID allow me to get into Usermin. But then I got "Error with POP login" in red ink on the page!"

In fact the good news seems to be that if I do that, his email seems to work OK. Clients such as Outlook can send & receive fine it seems.

The problem now is with Usermin. The error on logging in to Usermin is: "An error occurred listing mail in this folder : Failed to login to POP3 server : Authentication failed."

So clearly the Usermin client is sending the wrong user/password combo? (Presumably the one for the MySQL user "steven" rather than the one for "steven@domain.com").

Do you know how I can fix Usermin to correct this?

(I am also still getting a server validation error: "Mail for domain : Home directory /home/domain.com/homes/steven for user steven is owned by steven@domain.com")

Mon, 10/10/2011 - 12:36
andreychek

So, the hack I'm going to propose should help get you up and running... and I'll work out a longer-term fix with Jamie regarding the username clash you saw.

However, what you could try is this:

  1. Make a new directory for the steven user, something like "/home/domain.com/homes/steven_mysql"

  2. Set the "steven" user to use /home/domain.com/homes/steven_mysql as it's homedir just by changing that path in the /etc/passwd file

  3. Change the permissions on that directory so that it's owned by the user steven

Once you do that -- then delete the /home/domain.com/homes/steven/.usermin/mailbox/inbox.imap file. That will be re-created next time you log in.

-Eric

Wed, 10/12/2011 - 08:22
PaliGap

You know what Eric - that's fixed it!

Thanks ever so much

Topic locked