ISPconfig 3 UID cleanup-fixing

Discussion in 'Installation/Configuration' started by sheshes, Jan 29, 2014.

  1. sheshes

    sheshes Member

    Guys I recently had to reinstall ISPconfig due to some hardware failure which resulted to data loss.

    I have resetup everything (moved from courier to dovecot) and restored pretty much all of my files.

    I have backups of /etc/group,shadow,passwd but never copied them over as it will mess up things badly.

    Now, what I need is to clear up old website groups and users, so my ISPconfig server can start registering users again from client1 not client12 and the same with web1 etc.

    Is there a way already into ISPconfig that can fix this matters by iterating through the clients and users and deleting the unused ones and correcting the UIDs of anything that is wrong?

    Thanks in advance
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats great that you have the backup, because now you can simply take over the required users like its done when you e.g. move a ispconfig installation to a new server. Off course, do not copy over the whole files, just the users like I described in several posts about ispconfig mirations.

    1) copy all web* users from passwd and shadow file to the files on your new server. If you created ssh users in ispconfig for the websites, then copy these as well.
    2) copy all client* groups from /etc/group and /etc/gshadow to the files on the new server.
    3) copy the line of the sshusers group from /etc/group and /etc/gshadow to the new files.

    If you had not installed ispconfig yet, it would have been even esaier because you could have copied all user and group lines, starting from "vmail" to the files of the new server and ispconfig would have picked up the uid's and gid's automatically durig installation.

Share This Page