You can translate the question and the replies:

Create LDAP User using VQL

All, I searched the forums, but all i could find are references to the VQL docs and another stating we shouldn't create ldap users using VQL. I'm trying to follow the syntax in the VQL guide but am not having any luck creating an LDAP user via VQL. Here is my script: CREATE USER test LDAP(DATASOURCE ldapdb.active_directory USERNAME domain\test) 'test description';
user
06-10-2017 12:15:08 -0400

3 Answers

Hi, I followed the below syntax to create an user using VQL and I was able to create the user with LDAP Authentication sucessfully. `CREATE USER <user_name> LDAP(DATASOURCE <database_name>.<datasource_name> USERNAME '<user_name>') ‘<description>’` Ensure to provide the <user_name> value as a literal that refers to the distinguished name of the user in LDAP server. Also, we recommend creating databases with LDAP Authentication than creating users with LDAP Authentication. You can refer to the “[Creating Users](https://community.denodo.com/docs/html/browse/6.0/vdp/vql/creating_databases_users_roles_and_access_privileges/creating_users/creating_users#syntax-of-the-create-user-statement)” section of the Virtual DataPort VQL Guide to know more about creating users and our recommendations on LDAP Authentication. Hope this helps!
Denodo Team
09-10-2017 06:49:13 -0400
Thank you. The syntax above worked. I was missing the single quote around the domain user account. I happened to go back to the documentation hoping i just missed something obvious, but for some reason I could not ascertain when to use single quotes or not based on the syntax provided by the VQL Guide. Are single quotes required for literals, but not Identifiers?
user
09-10-2017 11:02:02 -0400
Hi, Yes, the literals are to be specified with quotes and identifiers are not. The syntax for the CREATE USERS syntax in the [documentation](https://community.denodo.com/docs/html/browse/6.0/vdp/vql/creating_databases_users_roles_and_access_privileges/creating_users/creating_users#syntax-of-the-create-user-statement) specifies if a parameter is a literal or an identifier. You can follow the same. Hope this helps!
Denodo Team
17-10-2017 01:06:00 -0400
You must sign in to add an answer. If you do not have an account, you can register here