Community discussions

MikroTik App
 
Aymen1986
newbie
Topic Author
Posts: 33
Joined: Thu Jul 12, 2018 5:15 pm

Adding users using script

Tue Jan 04, 2022 1:51 pm

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
 
User avatar
baypierre
just joined
Posts: 1
Joined: Sat Jun 05, 2021 7:27 pm

Re: Adding users using script

Wed Jan 05, 2022 5:14 pm

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.
 
SimonAngatia
just joined
Posts: 5
Joined: Sat Apr 09, 2022 7:43 am

Re: Adding users using script

Thu May 05, 2022 11:29 am

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.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12658
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Adding users using script

Thu May 05, 2022 4:01 pm

numbers=333333 ???
 
isalehgholami
just joined
Posts: 1
Joined: Fri Sep 20, 2024 8:57 pm

Re: Adding users using script

Fri Sep 20, 2024 9:02 pm

Any updates for this ?

Mine says command user-manager not found !
 
User avatar
abbio90
Member
Member
Posts: 447
Joined: Fri Aug 27, 2021 9:16 pm
Location: Oristano
Contact:

Re: Adding users using script

Sun Sep 29, 2024 9:33 pm

since you use script also interesting this command to generate random passwords
{
:local NumberRandom [:rndnum from=100000 to=999999];
:put $NumberRandom
}
 
User avatar
abbio90
Member
Member
Posts: 447
Joined: Fri Aug 27, 2021 9:16 pm
Location: Oristano
Contact:

Re: Adding users using script

Sun Sep 29, 2024 9:35 pm

you can also do a sef registration if you want, but we'll go into more detail there
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12658
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Adding users using script

Mon Sep 30, 2024 12:21 pm

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.
 
User avatar
abbio90
Member
Member
Posts: 447
Joined: Fri Aug 27, 2021 9:16 pm
Location: Oristano
Contact:

Re: Adding users using script

Wed Oct 02, 2024 10:42 am

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
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12658
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Adding users using script

Wed Oct 02, 2024 11:13 am

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.
 
User avatar
abbio90
Member
Member
Posts: 447
Joined: Fri Aug 27, 2021 9:16 pm
Location: Oristano
Contact:

Re: Adding users using script

Thu Oct 03, 2024 7:31 am

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