A
A
Aborigen10202019-03-20 10:26:03
cmd/bat
Aborigen1020, 2019-03-20 10:26:03

How to set up multiple connection with different users?

Hello!
There is some software, I want to run it from the batch file. Softina does the work and puts the report in the directory 192.168.1.1\report\.
And the directory is given rights to the user, for example, npa_user.
The bottom line is that this address, let's say 192.168.1.1, has several shared directories for different users.
And if the computer already has a connection to the network drive 192.168.1.1\foo\bar\ with a user, for example, work_hard, then the script that mounts the network drive with the user npa_user swears at

"Множественное подключение к серверу или к общим ресурсам одним пользователем 
с использованием более одного имени пользователя не разрешено".

It is undesirable to delete the current ones (user work_hard, etc.). this will break other utilities.
How can you map a network drive with a different user if you already have a connection to this server under a different user?
I suppose you need to add a check for the possibility of reading remote balls with current rights to the batch file. If they are not there, mount with npa_user rights. But maybe there is a more elegant solution?
The domain is not in use.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
res2001, 2019-03-20
@res2001

Grant write permissions to the required directory to all users under which the script is run.
So that users do not crawl into this directory on their own - do not connect it as a network drive. In the program, set the UNC path to the directory for writing the report.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question