Tag Archive for mysql

MySql Text field maximum length

Some of my favorite text storage field type in MySql :

TINYTEXT (up to 256 bytes)
TEXT (up to ~64kb)
MEDIUMTEXT (up to ~16MB)
LONGTEXT (up to ~4GB)

For example; a short description about a “user profile”, normally i use TEXT to store multiple paragraph with standard html syntax.

~Sharing what i’ve experienced to the world

FreeRadius MySql user password hashing

Here’s the quick note on how to insert hash password entry in mysql for FreeRadius environment.
Run insert via linux terminal using this line:

INSERT INTO radcheck (username, attribute, op, password) VALUES('admin','Crypt-Password', ':=',  encrypt('test1234'));

Result entry di dalam database :

VALUES('admin','Crypt-Password',':=','YHx56BpoLV0uU');

Notice that the password value is encrypted from ‘test1234‘ becoming ‘YHx56BpoLV0uU‘.

Hashing method yang boleh digunakan di FreeRadius environment.

{clear} User-Password clear-text passwords
{cleartext} User-Password clear-text passwords
{crypt} Crypt-Password Unix-style “crypt”ed passwords
{md5} MD5-Password MD5 hashed passwords
{smd5} SMD5-Password MD5 hashed passwords, with a salt
{sha} SHA-Password SHA1 hashed passwords
{ssha} SSHA-Password SHA1 hashed passwords, with a salt