Hi,I was exploring various means of connecting to a KDB+ database thru Ccode. I came across two functions1. khp, where we pass hostname and port2. khpu, where we pass hostname, port, user id and password.How can we create accounts in the kdb+ personal edition.Please advice.Nav
X-Priority: 3X-MSMail-Priority: NormalX-Mailer: Microsoft Windows Mail 6.0.6000.16480X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6000.16669create a file with user names and password in following manner-user1:password1user2:password2user3:password3user4:password4run q session with this command -q -u user_file_path -p prot_number----- Original Message ----- From: “Nav” <nav.andraste>To: “Kdb+ Personal Developers” Sent: Monday, January 19, 2009 10:17 AMSubject: [personal kdb+] Creating user accounts for kdb+ personal edition>> Hi,>> I was exploring various means of connecting to a KDB+ database thru C> code. I came across two functions> 1. khp, where we pass hostname and port> 2. khpu, where we pass hostname, port, user id and password.>>> How can we create accounts in the kdb+ personal edition.>> Please advice.>> Nav> ></nav.andraste>
X-Mailer: Apple Mail (2.930.3)or better, create a file with userids as below, but with the md5’d passwordsand save the file one level up from the startup directory so it’s not directly accessible from the q session// 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)On 19.01.2009, at 16:45, KDB+ wrote:>> create a file with user names and password in following manner->> user1:password1> user2:password2> user3:password3> user4:password4>> run q session with this command ->> q -u user_file_path -p prot_number>>> ----- Original Message -----> From: “Nav” <nav.andraste>> To: “Kdb+ Personal Developers” > Sent: Monday, January 19, 2009 10:17 AM> Subject: [personal kdb+] Creating user accounts for kdb+ personal > edition>>>>>> Hi,>>>> I was exploring various means of connecting to a KDB+ database >> thru C>> code. I came across two functions>> 1. khp, where we pass hostname and port>> 2. khpu, where we pass hostname, port, user id and password.>>>>>> How can we create accounts in the kdb+ personal edition.>>>> Please advice.>>>> Nav</nav.andraste>
Thanks for your help, but there seems to be a problem .I have created user id and password combos and have stored them in thefile mentioned. I have added code in the c++ program, which allows thekdb+ database to manipulate .csv files( to create the database). Nowwhen the code tries to use these csv files to create the database, anerror is thrown saying"access"which basically means that a protected database/file is accessedwithout a valid userid and password, or the user doesnt have therights to access the said csv file.How do I go about solving this issue. Please advice.Nav.On Jan 19, 9:06?pm, Simon Garland <simon.garl…> wrote:> or better, create a file with userids as below, but with the md5’d ?> passwords> and save the file one level up from the startup directory so it’s not ?> directly accessible from the q session>> // 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)>> On 19.01.2009, at 16:45, KDB+ wrote:>>>>>> > create a file with user names and password in following manner->> > user1:password1> > user2:password2> > user3:password3> > user4:password4>> > run q session with this command ->> > q -u user_file_path -p prot_number>> > ----- Original Message -----> > From: “Nav” <nav.andra…>> > To: “Kdb+ Personal Developers” > > Sent: Monday, January 19, 2009 10:17 AM> > Subject: [personal kdb+] Creating user accounts for kdb+ personal ?> > edition>> >> Hi,>> >> I was exploring various means ?of connecting to a KDB+ database ?> >> thru C> >> code. I came across two functions> >> 1. khp, where we pass hostname and port> >> 2. khpu, where we pass hostname, port, user id and password.>> >> How can we create accounts in the kdb+ personal edition.>> >> Please advice.>> >> Nav- Hide quoted text ->> - Show quoted text -</nav.andra…></simon.garl…>
X-Mailer: Apple Mail (2.930.3)that’s -u working as it should (you’re presumably attempting to access a file “above” the startup directory)if you want the userid/password check, but don’t want the access control use -U insteadOn 20.01.2009, at 10:22, Nav wrote:>> Thanks for your help, but there seems to be a problem .>> I have created user id and password combos and have stored them in the> file mentioned. I have added code in the c++ program, which allows the> kdb+ database to manipulate .csv files( to create the database). Now> when the code tries to use these csv files to create the database, an> error is thrown saying> “access”> which basically means that a protected database/file is accessed> without a valid userid and password, or the user doesnt have the> rights to access the said csv file.>> How do I go about solving this issue. Please advice.
Hi,Thanks for your help. The issue got resolved with -U. However with -u,even if the files were in the same directory as the q executable, thesame error was thrown.NavOn Jan 20, 3:00?pm, Simon Garland <simon.garl…> wrote:> that’s -u working as it should (you’re presumably attempting to access ?> a file “above” the startup directory)>> if you want the userid/password check, but don’t want the access ?> control use -U instead>> On 20.01.2009, at 10:22, Nav wrote:>>>>>> > Thanks for your help, but there seems to be a problem .>> > I have created user id and password combos and have stored them in the> > file mentioned. I have added code in the c++ program, which allows the> > kdb+ database to manipulate .csv files( to create the database). Now> > when the code tries to use these csv files to create the database, an> > error is thrown saying> > “access”> > which basically means that a protected database/file is accessed> > without a valid userid and password, or the user doesnt have the> > rights to access the said csv file.>> > How do I go about solving this issue. Please advice.- Hide quoted text ->> - Show quoted text -</simon.garl…>