Problem changing id of virtual domain name

5 posts / 0 new
Last post
#1 Thu, 04/23/2009 - 05:40
fingal

Problem changing id of virtual domain name

Hi,

How do you change the Linux user and group id of a virtual domain?

I've tried to manually change it by first do usermod/groupmod, then changing the original user/group id among some files under /etc/webmin/, but I still get errors when I do Validate Virtual Servers:

xyz.org Administration user : Administration user xyz has UID 601, but the domain's UID is 506 Home directory : Home directory /home/xyz is owned by xyz instead of xyz

and in several other Virtualmin settings where it shows the Linux name of UID 506 instead of UID 601.

Reagards, Fingal

Thu, 04/23/2009 - 06:04
andreychek

Yeah, I'm not sure it was ever designed for the UID and GID of Virtual Server's to be easily changed :-) But I'm sure you can do it. Here's some thoughts:

* In /etc/webmin/virtual-server/domains/, are all the domains on the server. In each are a uid, gid, and ugid field. You'll need to change the files relating to Virtual Servers owned by this particular user.

* You'll need to update map.gid in /etc/webmin/virtual-servers/

* You'll need to update /etc/webmin/file/USERNAME.acl

* And also /etc/webmin/proc/USERNAME.acl

* And of course, you'll need to update the permissions on the user's home directory as well

That's what I found by doing a quick search in the /etc/webmin directory -- there could be other things I missed, but that seems to be the bulk of it :-)
-Eric

Thu, 04/23/2009 - 06:40 (Reply to #2)
fingal

I had changed ownerships and some of the files you mentioned, but missed those under /etc/webmin/virtual-servers/. And I don't have a map.gid there, only files with some unique number for each domain. Changing those seems to have solved most of the problems I've had!

I still have some minor problems, but I hope to be able to solve them.

Btw, I think it is sort of a drawback that you can't assign a virtual domain to an already existing UID/GID. The original problem is that I'm trying to match the UID/GID of the domains from a mounted NFS file system.

Thanks!

Thu, 04/23/2009 - 06:46 (Reply to #3)
andreychek

Howdy,

Glad to hear it's coming along!

You have a valid point about NFS... you're welcome to file a ticket in the Bugs and Issues section and plead your case there... if Jamie doesn't already have a way to handle that, he may consider adding one.
-Eric

Thu, 04/23/2009 - 11:36 (Reply to #4)
fingal

Hi again,

Of course I had a map.gid file, and I needed to change everything just as you wrote. I was too quick and missed some files.

I might add a request for this into Bugs and Issues. At least one could add the "procedure" you wrote to the FAQ.

Thanks for the quick help!

Topic locked