I have around 500 users in PPP/Secret section (pppoe users)
I want to migrate these users to User manager (with fix profile of 512kb)
Is there any script which can read from ppp section and then create all users in Userman ??
I have around 500 users in PPP/Secret section (pppoe users)
I want to migrate these users to User manager (with fix profile of 512kb)
Is there any script which can read from ppp section and then create all users in Userman ??
This should be possible. You just need to know which PPP items you want to transfer over.
I would test with one user first. The following example transfers user, pass, and ip address. Edit the “ppp1” to be an existing ppp user. Then copy/paste this into the terminal:
{
:local testName “ppp1”
/ppp secret
:local name [get [find name=“testName”] name]
:local pass [get [find name=“testName”] password]
:local ip [get [find name=“testName”] remote-address]
/tool user-manager user
add name=$name password=$pass ip-address=$ip customer=admin
}Once you have determined one user will transfer over successfully, then you can automate them all:
/ppp secret
:foreach i in=[find] do={
:local name [get $i name]
:local pass [get $i password]
:local ip [get $i remote-address]
/tool user-manager user add name=$name password=$pass ip-address=$ip customer=admin
}
thanks mr.scot, problem solved,
Hello mr
i export all of my hotspot users details to a text file (usersd.txt)
my server crash down and i lost all my users data, is there any way to backup them from this file ?
other than writing them manually
thanks
post few lines of your text file here, and maybe , using scripting or simple search and replace in text file, you can restore the users.
Hi Skott,
This solution looks great but can you please tell the script through which the hotspot users can be exported to usermanaer
Thanks in advance.