We have an assortment of non-cpanel boxes inhouse that have email accounts on them and as we consolidate them we find that some of them have hundreds of email accounts each using the old format of logging in with the account name (no '@domain.com' after it).
So if the physical server is 'something.com' the email account names are bob1, tony4, mike6 and the users either login with the short name or the full server address ([email protected]) not a virtual host. Its easy enough to create the domain on a cpanel box, but not the user with the existing password. We do not care about filespace, home directories, shells, etc.
What we would like to do is somehow parse the passwd file and grab enough info so we could import the usernames and passwords (nothing else about the account or existing email) and create new email accounts on the cpanel boxes (old and cpanel boxes running same OS version so passwd formats should be close). I can sed/awk/grep/etc.. anything to death and I fully understand the passwd file formats, etc. so this isnt new to me, just not sure how the cpanel/whm environment has to be fiddled with.
Has anyone done this before?. I imagine it would be easy to figure out nibbling on the password file to get what I need, but is it possible to feed it to cpanel or process it with a series of steps so cpanel creates email accounts for the domain?.
Hope this makes sense, if not I can give more detail.
So if the physical server is 'something.com' the email account names are bob1, tony4, mike6 and the users either login with the short name or the full server address ([email protected]) not a virtual host. Its easy enough to create the domain on a cpanel box, but not the user with the existing password. We do not care about filespace, home directories, shells, etc.
What we would like to do is somehow parse the passwd file and grab enough info so we could import the usernames and passwords (nothing else about the account or existing email) and create new email accounts on the cpanel boxes (old and cpanel boxes running same OS version so passwd formats should be close). I can sed/awk/grep/etc.. anything to death and I fully understand the passwd file formats, etc. so this isnt new to me, just not sure how the cpanel/whm environment has to be fiddled with.
Has anyone done this before?. I imagine it would be easy to figure out nibbling on the password file to get what I need, but is it possible to feed it to cpanel or process it with a series of steps so cpanel creates email accounts for the domain?.
Hope this makes sense, if not I can give more detail.