Community discussions

MikroTik App
 
linuxciscodaniel
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 73
Joined: Sat Aug 08, 2009 10:58 pm

authentication pin with mikrotik

Tue Aug 11, 2009 1:23 pm

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
 
userman
Member Candidate
Member Candidate
Posts: 196
Joined: Tue Sep 05, 2006 2:53 pm

Re: authentication pin with mikrotik

Thu Aug 13, 2009 11:16 am

You can use this PIN as username and leave password blank.
 
User avatar
skillful
Trainer
Trainer
Posts: 552
Joined: Wed Sep 06, 2006 1:42 pm
Location: Abuja, Nigeria
Contact:

Re: authentication pin with mikrotik

Thu Aug 13, 2009 3:58 pm

In addition to that, you can edit the login.html file, change "login" to "pin" and then hide the password field.
 
ojaymon
just joined
Posts: 10
Joined: Tue Oct 13, 2009 4:44 pm

Re: authentication pin with mikrotik

Wed Oct 14, 2009 12:45 am

You can use this PIN as username and leave password blank.
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
Last edited by ojaymon on Wed Oct 14, 2009 8:10 pm, edited 1 time in total.
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: authentication pin with mikrotik

Wed Oct 14, 2009 1:12 am

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.
 
ojaymon
just joined
Posts: 10
Joined: Tue Oct 13, 2009 4:44 pm

Re: authentication pin with mikrotik

Wed Oct 14, 2009 7:49 pm

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.
 
linuxciscodaniel
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 73
Joined: Sat Aug 08, 2009 10:58 pm

Re: authentication pin with mikrotik

Tue Mar 30, 2010 6:24 pm

thanks for all

Who is online

Users browsing this forum: No registered users and 4 guests