authentication pin with mikrotik

Hello Mister

I am Daniel from Cameroon, I have a router MIKROTIK RouterBOARD 433AH, and I have a server radius BSDradius and I want to use the card system for the authentication of my customer, but I want do the authentication just with the PIN, I want two question
MIKROTIK can do this authentication type ? (just PIN, or just login and no login and password)
How can do that if it is possible

Thanks for your response

I want your help

You can use this PIN as username and leave password blank.

In addition to that, you can edit the login.html file, change “login” to “pin” and then hide the password field.

Hello I need help on this too. Leaving password blank seems to only work if you are just creating one user at a time. But how can this be implemented if you are creating a batch of users-lets say you need about 50 pins generated at once without any passwords. How can this be done? what is quite annoying about user manager is that it does not give you the option to even determine whether or not you want to have passwords in batch creation mode. It generates passwords by default. It does not also give you the option to determine how many characters you desire for the login or password. Is there anyway around these? The summary is this:

  1. I need to create a batch of pins for log in at once without passwords. How?
  2. I need to be able to determine how many alpha-numeric values I require for the pins without being constrained by what is preset in user manager. How?

I would appreciate if anyone can help with this

I don’t use User Manager at all, but if you can’t find a native way of doing this, you can easily generate the CLI commands to add accounts on another machine and just paste them in.

Below a quick and very dirty sample as a shell script (requires seq and openssl, everything else should be standard):

#!/bin/sh
if [ -z "$1" ]
then
    echo "Usage: generate_pins.sh [length of PIN] [number of PINS]"
    exit 1
fi
LENGTH="$1"
if [ -z "$2" ]
then
    echo "Usage: generate_pins.sh [length of PIN] [number of PINS]"
    exit 1
fi
NUMBER="$2"
for i in `seq 1 "$NUMBER"` 
do
	PIN=`head -c "$LENGTH" /dev/urandom | openssl base64 | tr '[/=+]' '[ZzZ'] | head -c "$LENGTH"`
	echo "/tools user-manager users add username=$PIN password=\"\""
done

And a sample run:

sh-3.00# sh generate_pins.sh 6 5
/tools user-manager users add username=YSPKjQ password=""
/tools user-manager users add username=9PX38J password=""
/tools user-manager users add username=hfPvae password=""
/tools user-manager users add username=8wMtj7 password=""
/tools user-manager users add username=xJQMJR password=""

That line may not be a valid command in RouterOS to generate a User Manager user (as I said I don’t use it and don’t have it installed anywhere), but it should be easy enough to adjust the script to output valid commands.

Thanks Fewi for your suggestions. Lucky you but this is quite too advanced for me at this time. Unfortunately I have no knowledge of scripting at all. I was hoping that there might be a simpler way of implementing this. I guess I may have to hope for this implementation in newer versions if no other alternatives.
I appreciate your suggestions anyway.

thanks for all