Bulk change user IP addresses

cbolt

Verified User
Joined
Feb 6, 2008
Messages
28
Hi

Does anyone know if there is a way to change the IP address for a number of users in one go without doing it manually one at a time?
I am wanting to move users off the server IP address onto the reseller's shared IP address and then prevent the reseller from creating accounts using the server IP.
I know there is a script for changing the server IP, but that's not what I'm doing.
Any suggestions would be appreciated!
Thanks
 
If anybody else needs to do this there is a script at /usr/local/directadmin/scripts/ipswap_reseller.sh that will do this, but it's alpha.
It worked and I haven't spotted any issues yet.
However it did output some minor errors (which don't appear to have affected the outcome). it would be awesome if someone from DirectAdmin could fix.

./ipswap_reseller.sh: line 31: c: command not found
./ipswap_reseller.sh: line 31: [: : integer expression expected
./ipswap_reseller.sh: line 35: c: command not found
./ipswap_reseller.sh: line 35: [: : integer expression expected
 
Hello,

Try and run it as

Code:
DIRECTADMIN=/usr/local/directadmin/directadmin [COLOR=#333333]/usr/local/directadmin/scripts/ipswap_reseller.sh[/COLOR]

append the command line with your parameters: <oldip> <newip> <reseller>
 
Back
Top