Community discussions

MikroTik App
 
cicserver
Member
Member
Topic Author
Posts: 303
Joined: Sun Jul 24, 2011 12:04 pm

Renew User account with CLI in 'USER MANAGER'

Thu May 07, 2015 1:40 pm

I have User Manager with different profiles. I want to know that is there any possibility that I can renew a user account via command? (not via userman gui)? example if a user account is expired , I want to refresh it via command,

Any help would be appreciated :)
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: Renew User account with CLI in 'USER MANAGER'

Thu May 07, 2015 2:29 pm

I think the command you're looking for is "/tool user-manager user create-and-active-profile". With that, you activate a particular profile for a particular user, enabling them to log in. In essence, it's the same thing as the "+" on user's details, when using the web UI.
 
cicserver
Member
Member
Topic Author
Posts: 303
Joined: Sun Jul 24, 2011 12:04 pm

Re: Renew User account with CLI in 'USER MANAGER'

Mon May 11, 2015 8:48 am

Thanks, It worked perfectly.
Ok one more question. Is there any command I can use to print specific user profile ONLY?
Example this command
/tool user-manager user print  
but this command prints lots of data, I only want to see what profile user currently have? like 512k
Flags: X - disabled, A - active, I - incomplete 
 0     ;;; 1
       customer=admin name="test" actual-profile="512k" password="test" first-name="test" last-name="testtt" phone="999393" 
       location="knckd" shared-users=1 wireless-psk="" wireless-enc-key="" wireless-enc-algo=none uptime-used=1m8s download-used=232 
       upload-used=2674 last-seen=may/15/2015 10:41:28 
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: Renew User account with CLI in 'USER MANAGER'

Mon May 11, 2015 2:02 pm

Use the "where" argument if you want to print users meeting a particular condition (e.g. all users under a specific profile). All print commands have it (and "find" too).

If you want to print one particular user, you can use the "from" argument, with the username as value, e.g.
/tool user-manager user print from=test

Who is online

Users browsing this forum: No registered users and 11 guests