LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I create NI Domain and Users Programmatically?

Hi,
 
I have Made a Client Server application for my small LAN which communicate via TCP/IP. I have added some security by using DSC security. At this time i created a 'domain' on server computer by using DSC menu, but what if customer wants to create domain and users on his own as he wont have the Labview to do so.
 
so my question is "how can i create domain or users programmatically".
 
 
 
--Alok
-AL☼K
0 Kudos
Message 1 of 13
(5,513 Views)
Hello Alok,
 
Domains and user accounts are administered through the User Manager, which is a separate executable file that can be launched programmatically using the System Exec VI.  In fact, we have a straightforward example of how to implement this as part of a Knowledgebase article.  Please give this a look, as I believe it will meet your needs well. 
Cheers,

Matt Pollock
National Instruments
0 Kudos
Message 2 of 13
(5,498 Views)
Hi Matt,
 
Example given by you is showing only local filed only, but I want to locate a domain exists anywhere in my network. Moreover it's not logging me on even on my local domain.
 
Furthermore please tell me one more thing, will this function will run if the labview does not exist on the machine....suppose I'm running an executable of my vi/project.
 
and what if i want to create domains and users from an executable.
 
-Alok
-AL☼K
0 Kudos
Message 3 of 13
(5,489 Views)

Hello Alok,

The User Manager is a standalone executable that can operate without LabVIEW installed.  You will need the LabVIEW Run-Time Engine installed, however.  You can call the User Manager from a built executable if the User Manager is present on the target machine as well - all that the LabVIEW VI/executable does is tell Windows to launch this utility, from which you will have access to all of the options available to you.

Cheers,

Matt Pollock
National Instruments
0 Kudos
Message 4 of 13
(5,478 Views)
Hi and thanks Matt,
 
It's nice, DSC security manager does't need LabVIEW installed( it's ok about run time engine):smileyhappy:. But I want to create/edit domains and users programatically, as i will add it in configuration section where Administrator can add delete and update any user as well as domain. How can i do this? i am unable to find any function to create/edit/delete domain as well as user.
 
 
Moreover, i think usrmgr.exe is only for loggin in purpose. Even if so, it's not logging me on my local domain, why?Smiley Mad
 
-Alok
-AL☼K
0 Kudos
Message 5 of 13
(5,468 Views)

Hi Alok,

There are no built-in LabVIEW functions to programmatically modify the user/domain listing.  All of this is accomplished through the User Manager.  You can query the information using the built-in functions in LabVIEW, however.  If no local domain is defined on the machine, you can create one through the User Manager, as well as add, delete, and edit users within this domain.  If no domain exists, the user will have administrator access to create a new domain and add users, otherwise users must log in to gain access to any functionality.  You can also log into remote domains on your network through this utility.

Cheers,

Matt Pollock
National Instruments
0 Kudos
Message 6 of 13
(5,447 Views)

Thanks Matt,

OK i will give contants for domain and user names in my application, and user will not be able to modify these two. But how will he create it accordingly, if he will not have labview to do so?

I am interested to create an installer of my application.

Thanks again

-Alok

 

 

-AL☼K
0 Kudos
Message 7 of 13
(5,429 Views)

To clarify, you can still edit the users, but for the security to work properly, each user would need to be assigned to one or more groups.  These groups must stay constant, since ideally you would associate permissions for front panel controls/indicators based on a user's group affiliation, not on the user name itself.  New users can be added to a group and inherit that group's security privileges without modification to the code.

To create an installer for the application, you can create an installer build specification within your project window, making sure to first create an executable build specification.  Doing this does require the Application Builder for LabVIEW, which comes as part of the Professional Development System or as an add-on to the Full Development System.

Cheers,

Matt Pollock
National Instruments
Message 8 of 13
(5,412 Views)
Thanks Matt,
 
I'll get u again if i get problem again.
 
cheers !!
 
-Alok
-AL☼K
0 Kudos
Message 9 of 13
(5,404 Views)
Hello Matt

Actually, I had to call the Domain Manager (C:\Program Files\National Instruments\shared\Security\dmanager.exe) to create a domain group that I can manage.
But this app doesn't exists in the server machine. It's a windows 2000 NT Server, is there support for this version?

Alternatively, I could use the "local" domain of the User Manager, but I think I couldn't access this domain. When I try to log in with the account I created (and it really exists, I checked after create it), the following error is returned:
Error -1967345663 occurred in ...

IAK_SHARED:  (Hex 0x8ABCB001) Generic security error.

Method Name: NI Security:Login
Thanks!
0 Kudos
Message 10 of 13
(5,307 Views)