// create the file
> simon@simon-macbook:~/q$ q
> KDB+ 2.5 2009.01.11 Copyright (C) 1993-2009 Kx Systems
>
> q)raze string md5"password1"
> "7c6a180b36896a0a8c02787eeafb0e4c"
> q)`:uu.txt 1:"user1:",(raze string md5"password1"),"\nuser2:",raze
> string md5"password2"
> `:uu.txt
> q)\\
> simon@simon-macbook:~/q$ cat uu.txt
> user1:7c6a180b36896a0a8c02787eeafb0e4c
> user2:6cb75f652a9b52798eb6cf2201057c73
// shift it upstairs
> simon@simon-macbook:~/q$ mv uu.txt ..
// and start a password protected session
> simon@simon-macbook:~/q$ q -u ../uu.txt -p 5005
> KDB+ 2.5 2009.01.11 Copyright (C) 1993-2009 Kx Systems
>
> q)
// then from another session try and login
> q)hopen`::5005
> 'access
> q)hopen`::5005:user1
> 'access
> q)hopen`::5005:user1:password
> 'access
> q)hopen`::5005:user1:password1
> 3
> q)3"read0`:../uu.txt"
> 'access
> q)
if you want the userid/password check, but don't want the access
control use -U instead