RUT241 Hotspot howto hash user passwords

Hi.

I will add hotspot users with uci commands (username, group ) , but I don’t know how to hash the user password.

With “uci show” command, I see:

chilli.@user[0]=user
chilli.@user[0].password=‘$1$l9/EKdLh$3GVJxy5cnnTqfFBf2Eknj/’
chilli.@user[0].group=‘default’
chilli.@user[0].username=‘user1’

Could you please tell me how to hash the password before inserting the new user ?

Thanks
Corrado

PHP crypto (MD5)

Hello,

You can use openssl which is already installed:

uci add chilli user
uci set chilli.@user[-1].username='user1'
#dont forget to add a pinch of salt (the password will be 'pass1' in this case)
openssl passwd -1 -salt abcd pass1
$1$abcd$PDaCHs3hGO3GYSrsEZtAl/
uci set chilli.@user[-1].password='$1$abcd$PDaCHs3hGO3GYSrsEZtAl/'
uci set chilli.@user[-1].group='default'
uci commit
/etc/init.d/chilli restart

Kind Regards,

This topic was automatically closed after 15 days. New replies are no longer allowed.