LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

permissions login for network files within LabView

The folders on our network have a set level of permissions.  Currently we use a generic account to login to the computer that has access to be able to "write" to certain folders on the network.  We want to limit access of this generic account to the network folders, but still give LabView the capability to write to them (i.e. Test data). 

 

Does LabView have a way of sending login information, before writing to a file/folder, that is different than the 'current user' logged in to the local machine? 

 

There are a couple of VIs to get permissions and set permissions, but not to the level I need with sending actual login information (i.e. user name & password).

 

Thanks in advance for you help!

Jeff

0 Kudos
Message 1 of 19
(5,526 Views)

Hello Jeff,

 

At which step during VI execution are you looking to enforce the user name and password? This example allows different levels of access to different parts of the VI, so you could restrict access to the write section. Here is another way to protect code sections through a user interface password entry, and you could add a user name section as well. Are you looking to write the test data to Microsoft Excel? If you have the Report Generation Toolkit, this example may be helpful. Let me know if you have any questions.

 

Regards,

Deborah Y.

Deborah Burke
NI Hardware and Drivers Product Manager
Certified LabVIEW Architect
0 Kudos
Message 2 of 19
(5,498 Views)

I don't think I phrased my question clearly.  Our network drives have a level of security that requires a user name and password.  Certain users are given permissions to write to the drive, others are given read only access.  I want labview to be able to write to the drive even if a read only user is logged into the machine.  I could code labview with a different user name and password than what is logged in to the machine.  Does this make sense?

0 Kudos
Message 3 of 19
(5,494 Views)

It does. LabVIEW has no mechanism for doing this. And neither do regular non-LabVIEW applications. LabVIEW just calls the system file functions using the credentials of the logged in user. If you want it to use a different set of credentials, then that's called impersonation. You can also simply use the runas command if you're in Windows.

0 Kudos
Message 4 of 19
(5,486 Views)

I have never heard of the runas command.  Looks like it is what I need.  I will give this a try.  Thanks for the reply!!

0 Kudos
Message 5 of 19
(5,482 Views)

An other option could be to set up a FTP server and use ftp,

 

M

Message 6 of 19
(5,473 Views)

Trouble escribió:

I have never heard of the runas command.  Looks like it is what I need.  I will give this a try.  Thanks for the reply!!


Do the runas command worked? Do the user has to be with a specific configuration to work form the command line?

0 Kudos
Message 7 of 19
(5,159 Views)

With .NET4.0 or later active directories work for using enterprise credentials.  (Trust me) I cannot pubically provide such examples but I have made this work!  Do not try with .NET 3.5 or earlier- it will not work.Smiley Wink

 

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 8 of 19
(5,130 Views)

I briefly tried it, but did not get it to work right away.  I was able to implement a different solution completely.  I would like to go back to this and try again though.

0 Kudos
Message 9 of 19
(5,082 Views)

Thanks for your answers. We didn't get it to work with runas command nor the enterprise credentials but our solution was to use ftp ( as marcomauri suggested it) with a single username use it only in labview code. 

0 Kudos
Message 10 of 19
(5,040 Views)