Page 1 of 1
Adding users using script
Posted: Tue Jan 04, 2022 1:51 pm
by Aymen1986
Hey there ..
I would like to ask a help in create users in USERMAN with profile using script
i tried a script but without adding profile limit to users
/tool userman user add username=test password=111 customer=admin
Re: Adding users using script
Posted: Wed Jan 05, 2022 5:14 pm
by baypierre
We assume your profile already exist and profile name =24H.
You need to execute the following two commands :
/tool user-manager user add customer=admin disabled=no username=333333 password=222222 shared-users=1;
/tool user-manager user create-and-activate-profile customer=admin profile=24H numbers=333333;
The first command will create username and password , but without profile
the second command will activate user with profile name 24H.
Note that numbers=username you want to change profile.
Re: Adding users using script
Posted: Thu May 05, 2022 11:29 am
by SimonAngatia
We assume your profile already exist and profile name =24H.
You need to execute the following two commands :
/tool user-manager user add customer=admin disabled=no username=333333 password=222222 shared-users=1;
/tool user-manager user create-and-activate-profile customer=admin profile=24H numbers=333333;
The first command will create username and password , but without profile
the second command will activate user with profile name 24H.
Note that numbers=username you want to change profile.
Thank you so much! It really helped me, a newbie. I would like to ask if you can help me know how to add user profile with limitations and how to disable users.
Re: Adding users using script
Posted: Thu May 05, 2022 4:01 pm
by rextended
numbers=333333 ???
Re: Adding users using script
Posted: Fri Sep 20, 2024 9:02 pm
by isalehgholami
Any updates for this ?
Mine says command user-manager not found !
Re: Adding users using script
Posted: Sun Sep 29, 2024 9:33 pm
by abbio90
since you use script also interesting this command to generate random passwords
{
:local NumberRandom [:rndnum from=100000 to=999999];
:put $NumberRandom
}
Re: Adding users using script
Posted: Sun Sep 29, 2024 9:35 pm
by abbio90
you can also do a sef registration if you want, but we'll go into more detail there
Re: Adding users using script
Posted: Mon Sep 30, 2024 12:21 pm
by rextended
User-Manager no longer exist on v7 (and only v7 containing :rndnum, v6 not).
On v7 user manager name is recyled for one new RADIUS system, that have nothing to do with user-manager.
So, all of this is just necroposting and writing random stuff without even thinking.
Re: Adding users using script
Posted: Wed Oct 02, 2024 10:42 am
by abbio90
the user manager package with the name "User manager" what should it be called? I agree that they made a completely new package, but the name remains the same. I don't think it's correct to say that User manager is not on Ros7.
rdnum only exists on Ros7 as you say
Re: Adding users using script
Posted: Wed Oct 02, 2024 11:13 am
by rextended
the user manager package with the name "User manager" what should it be called?
RADIUS server
I don't think it's correct to say that User manager is not on Ros7.
Since you don't work with it, you don't know the difference, otherwise you wouldn't have written this way.
The previous web interface has been removed, plus other things that are no longer there.
We used to have a hammer that did its job well, now there is a wrench that also unscrews screws, but it has lost its effectiveness as a hammer, even if you can hammer nails with it more difficult.
Re: Adding users using script
Posted: Thu Oct 03, 2024 7:31 am
by abbio90
I know the old user manager well. what I'm telling you is that mikrotik wanted to keep that name so whether you like it or not it's called that. then if it doesn't do what it did before that's another matter. but in the official channels it's still called user manager