I have written a service that monitors if my app is running and starts it if not. In result the app is run as a «system» user — which is the way I want it to be. I have several of those installations working properly.
The app should mount a network share that is in this case available on a linux samba server. The problem is that when running the command:
net use X: \\IP\share_name /user:login password
an error is displayed:
System error 1312 has occured.
A specified logon session does not exist. It may already have been
terminated.
I have run some checks and it turns out that the X: drive in local system is available, the server is online, the share is available, the credentials are OK, there are no other net use sessions running in this system. Also I have found out a strange behavior: running identical command as a standard user gives proper results and the drive is mounted properly.
Do you have any suggestions what might be the problem and how to solve it?
Additionally I am not a domain member, and the system that shows the error is Windows 7 Pro. I have other machines in the same network that do work properly without the error.
asked Sep 5, 2016 at 8:17
I have had the same issue some time ago. It helped when I introduced a domain name (even if you are not a domain member) before the login.
I your case try this command:
net use X: \\IP\share_name /user:whatEver\login password
answered Sep 5, 2016 at 10:54
mdghostmdghost
3863 silver badges8 bronze badges
2
Test this command:
EXEC XP_CMDSHELL ‘net use Z: 192.168.3.55backupShare password@123 /User:domainuser’
answered Jun 16, 2020 at 3:49
1
I’ve just run into the same problem on upgrading to Windows 10 PE 2004 (19041). The older Windows 10 PE 1803 (17134) did not require the dot before the username.
Here’s the solution:
- Put the password before the user (this is the argument order given by net use /?).
- Add the server’s name, IP or a dot and then a backslash (
.\
) before the username .
Use:
net use X: \\IP\share_name password /user:.\login
or
net use X: \\IP\share_name password /user:IP\login
If you have arguments with spaces, add parenthesis around them:
net use X: "\\IP\share name" "pass word" /user:".\test user"
answered Sep 21, 2021 at 17:09
- Remove From My Forums
-
General discussion
-
Hello,
we are having the following issue:
http://support.microsoft.com/default.aspx?scid=kb;en-us;968264&sd=rss&spid=11737
BUG:
When psremoting (or winrs-ing) onto a client Win7x64 machine, trying to mount a
DFS UNC, it fails with the following error.[client-1]: PS C:\Users\user\Documents> net use x:\\server\dfsshare /User:company\username ******
net.exe : System error 1312 has occurred.
+ CategoryInfo : NotSpecified: (System error 1312 has occurred.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandErrorA specified logon session does not exist. It may already have been terminated.
On the same machine, when mounting another share (sysvol) it does not fail.
[client-1]: PS C:\Users\user\Documents> net use x:\\server\sysvol
/User:company\username ******
The command completed successfully.If I run the same command on any client machine it does fail with the same error.
If I run the same command locally on that same client (client-1) as logged on interactive user, it does not fail.
- Remove From My Forums
-
Question
-
I am trying to get a self signed SSL cert bound to port 8080 for WCF unit testing on my Windows 2008 R2 development box.
I reserved the url without error:
netsh http add urlacl url=https://+:8080/ user=EVERYONE
Unfortunately, when I try to add the SSL binding for my certificate I get a wacky error.
«netsh http add sslcert ipport=0.0.0.0:8080 certhash=BE3102FAF81366C47B4E284D07E163128676DE77 appid={283647f3-ef12-4f46-8aeb-d59fc072dcda}»
«SSL Certificate add failed, Error: 1312
A specified logon session does not exist. It may already have been terminated.»
Note, previously I had bound a diff cert and decided to unbind it and go with a new self signed cert. The first cert seemed to bind without error.
Cert1 generated from these instructions:
http://blogs.msdn.com/b/james_osbornes_blog/archive/2010/12/10/selfhosting-a-wcf-service-over-https.aspx
Cert2 generated from these instructions:
http://msdn.microsoft.com/en-us/library/ff648498.aspx
Anyone else ever run into this?
Answers
-
For any poor soul that still encounters this issue, the 1312 error may be referring to the certificate store user. Your certificate has to come from the local MACHINE certificate store, not the current user certificate store (if using certmgr, do mmc->add/remove
snapin ->computer account (NOT the default that comes up when you run certmgr.msc!!!). Then get the cert from the personal area of the computer account). Of course, the certificate you select should be valid too.Yes this thread is old, but the issue still exists, and you should try this before deleting things or generating a bunch of certificates.
-
Marked as answer by
Tuesday, November 13, 2012 4:22 PM
-
Marked as answer by
-
No, but it worked for Cert1. I finally deleted all the netsh config, regenerated a new cert, and did the steps for #2. Worked fine this time around.
thanks
-
Marked as answer by
scott_m
Saturday, March 12, 2011 3:50 AM
-
Marked as answer by
How to fix the issue reported by «error code error 1312»
Special Offer
Instructions
The following steps should fix the error 1312 issue:
- Step 1.Download Outbyte PC Repair application See more information about Outbyte uninstall instructions EULA Privacy Policy
- Step 2.Install and launch the application
- Step 3.Click the Scan Now button to detect issues and abnormalities
- Step 4.Click the Repair All button to fix the issues
Compatibility | Win 11, 10, 8, 7 |
Download Size | 21.2 MB |
Requirements | 300 MHz Processor, 256 MB RAM, 50 MB HDD |
Limitations: trial version offers an unlimited number of scans, backups and restores of your Windows system elements for free. Registration for the full version starts from USD 29.95.
Installation: When you install software, it gives our advertisers a chance to speak to you. ALL OFFERS ARE OPTIONAL. There is no obligation to accept. Simply choose to decline the offer if you are not interested. If you are interested and choose to accept, you’ll help us to offer more software in the future. Again, there is no obligation to accept any offers. You have the option to decline all advertisements and still install and use the software for free.
Web Companion is your first line of defence. With hundreds of thousands of new virus strands created every day, Ad-Aware Web Companion is the perfect complement to your antivirus and web browser security.
A malfunction reported by «error code error 1312» may happen due to a number of different factors. Common causes include incorrectly configured system settings or irregular entries in the system elements, to name a few. Such issues may be resolved with special software that repairs system elements and tunes system settings to restore stability.
The article provides details on what the issue means, potential causes, and ways to resolve the issue.
- 1Meaning of the «error code error 1312»
- 2Causes of the «error code error 1312»
- 3Ways to repair the «error code error 1312»
Meaning of the «error code error 1312»
«Error code error 1312» is an issue name that usually contains details of the malfunction, including why it occurred, which system component or application malfunctioned, along with some other information. The numerical code in the issue name usually contains data that can be deciphered by the manufacturer of the component or application that malfunctioned. The issue with using this code may occur in many different locations within the system, so even though it carries some details in its name, it is still difficult for a user to pinpoint and fix the issue cause without specific technical knowledge or appropriate software.
Causes of the «error code error 1312»
If you have received this warning on your PC, it means that there was a malfunction in your system operation. «Error code error 1312» is one of the issues that users get as a result of the incorrect or failed installation or uninstallation of software that may have left invalid entries in your system elements, improper system shutdown due to a power failure or another factor, someone with little technical knowledge accidentally deleting a necessary system file or system element entry, as well as a number of other causes.
Ways to repair the «error code error 1312»
For an immediate fix of such issues, advanced PC users may be able to repair it by manually editing system elements, and others may want to hire a technician to do it for them. However, since any manipulations with Windows system elements carry a risk of rendering the operating system unbootable, whenever a user is in any doubt of their technical skills or knowledge, they should use a special type of software that is meant to repair Windows system elements without requiring any special skills from the user.
The following steps should help fix the issue:
- Download Outbyte PC Repair application Special offer. See more information about Outbyte uninstall instructions EULA Privacy Policy
- Install and launch the application
- Click the Scan Now button to detect potential issue causes
- Click the Repair All button to fix found abnormalities
The same application can be used to run preventative measures to reduce the chance of this or other system issues appearing in the future.
Симптомы
При попытке запуска на компьютере под управлением Windows Server 2008 R2 или Windows 7 следующую команду netsh :
Netsh http добавить sslcert ipport = certhash< IP-адрес и порт для привязки SSL > =< хеш сертификата > appid = slctlstorename< GUID владельца приложения > =< имя, в котором хранится список доверия Сертификатов хранилища > sslctlidentifier =< значение CTL >Примечание. Эта команда добавляет список доверия сертификатов (CTL) к привязке безопасного sockets layer (SSL).
Тем не менее операция не выполняется и появляется сообщение об ошибке, подобное приведенному ниже:
Сбой добавления сертификата SSL: 1312
Указанный сеанс не существует. Возможно, он уже был завершен.
Причина
Эта проблема возникает, так как строки Юникода в параметрах структуры неправильно усекаются при передаче этих строк для удаленного вызова процедуры (RPC). Таким образом происходит сбой операции проверки подлинности.
Решение
Сведения об исправлении
Существует исправление от корпорации Майкрософт. Однако данное исправление предназначено для устранения только проблемы, описанной в этой статье. Применяйте это исправление только в тех случаях, когда наблюдается проблема, описанная в данной статье. Это исправление может проходить дополнительное тестирование. Таким образом если вы не подвержены серьезно этой проблеме, рекомендуется дождаться следующего пакета обновления, содержащего это исправление.
Если исправление доступно для скачивания, имеется раздел «Пакет исправлений доступен для скачивания» в верхней части этой статьи базы знаний. Если этот раздел не отображается, обратитесь в службу поддержки для получения исправления.
Примечание. Если наблюдаются другие проблемы или необходимо устранить неполадки, вам может понадобиться создать отдельный запрос на обслуживание. Стандартная оплата за поддержку будет взиматься только за дополнительные вопросы и проблемы, которые не соответствуют требованиям конкретного исправления. Чтобы получить полный список телефонов поддержки и обслуживания клиентов корпорации Майкрософт или создать отдельный запрос на обслуживание, посетите следующий веб-сайт корпорации Майкрософт:
http://support.microsoft.com/contactus/?ws=supportПримечание. В форме «Пакет исправлений доступен для скачивания» отображаются языки, для которых доступно исправление. Если нужный язык не отображается, значит исправление для данного языка отсутствует.
Предварительные условия
Не существует предварительных условий.
Сведения о реестре
Для использования исправления из этого пакета нет необходимости вносить изменения в реестр.
Необходимость перезагрузки
Может потребоваться перезагрузить компьютер после установки данного исправления.
Сведения о замене исправлений
Это исправление не заменяет ранее выпущенные исправления.
Сведения о файлах
Глобальная версия этого исправления устанавливает файлы с атрибутами, указанными в приведенных ниже таблицах. Дата и время для файлов указаны в формате UTC. Дата и время для файлов на локальном компьютере отображаются в местном времени с вашим текущим смещением летнего времени (DST). Кроме того, при выполнении определенных операций с файлами, даты и время могут изменяться.
Примечания к сведениям о файлах Windows 7 и Windows Server 2008 R2
Важно. Исправления для Windows Server 2008 R2 и Windows 7 включены в одни и те же пакеты. Однако исправления на странице запроса исправлений перечислены под обеими операционными системами. Чтобы запросить пакет исправления, который применяется к одной или обеим ОС, установите исправление, описанное в разделе «Windows 7/Windows Server 2008 R2» страницы. Всегда смотрите раздел «Информация в данной статье относится к следующим продуктам» статьи для определения фактических операционных систем, к которым применяется каждое исправление.
-
Файлы MANIFEST (.manifest) и MUM (.mum), устанавливаемые для каждой среды, указаны отдельно в разделе «Сведения о дополнительных файлах для Windows Server 2008 R2 и Windows 7». Файлы MUM и MANIFEST, а также связанные файлы каталога безопасности (CAT) чрезвычайно важны для поддержания состояния обновленных компонентов. Файлы каталога безопасности, для которых не перечислены атрибуты, подписаны цифровой подписью корпорации Майкрософт.
Для всех поддерживаемых 86-разрядных версий Windows 7
Имя файла |
Версия файла |
Размер файла |
Дата |
Время |
Платформа |
---|---|---|---|---|---|
Cng.sys |
6.1.7600.16385 |
369,568 |
14-Jul-2009 |
01:17 |
x86 |
Ksecdd.sys |
6.1.7600.20667 |
67,472 |
13-Mar-2010 |
07:16 |
x86 |
Ksecpkg.sys |
6.1.7600.20667 |
133,512 |
13-Mar-2010 |
07:16 |
x86 |
Lsasrv.dll |
6.1.7600.20667 |
1,037,312 |
13-Mar-2010 |
07:13 |
x86 |
Lsasrv.mof |
Неприменимо |
13,780 |
10-Jun-2009 |
21:33 |
Неприменимо |
Lsass.exe |
6.1.7600.16385 |
22,528 |
14-Jul-2009 |
01:14 |
x86 |
Secur32.dll |
6.1.7600.16385 |
22,016 |
14-Jul-2009 |
01:16 |
x86 |
Sspicli.dll |
6.1.7600.20667 |
100,352 |
13-Mar-2010 |
07:13 |
x86 |
Sspisrv.dll |
6.1.7600.20667 |
15,360 |
13-Mar-2010 |
07:13 |
x86 |
Для всех поддерживаемых 64-разрядных версий Windows 7 и Windows Server 2008 R2
Имя файла |
Версия файла |
Размер файла |
Дата |
Время |
Платформа |
---|---|---|---|---|---|
Cng.sys |
6.1.7600.16385 |
460,504 |
14-Jul-2009 |
01:43 |
x64 |
Ksecdd.sys |
6.1.7600.20667 |
95,624 |
13-Mar-2010 |
08:00 |
x64 |
Ksecpkg.sys |
6.1.7600.20667 |
152,968 |
13-Mar-2010 |
08:00 |
x64 |
Lsasrv.dll |
6.1.7600.20667 |
1,446,912 |
13-Mar-2010 |
07:57 |
x64 |
Lsasrv.mof |
Неприменимо |
13,780 |
10-Jun-2009 |
20:52 |
Неприменимо |
Lsass.exe |
6.1.7600.16385 |
31,232 |
14-Jul-2009 |
01:39 |
x64 |
Secur32.dll |
6.1.7600.16385 |
28,160 |
14-Jul-2009 |
01:41 |
x64 |
Sspicli.dll |
6.1.7600.20667 |
136 192 |
13-Mar-2010 |
07:57 |
x64 |
Sspisrv.dll |
6.1.7600.20667 |
28,672 |
13-Mar-2010 |
07:57 |
x64 |
Lsasrv.mof |
Неприменимо |
13,780 |
22-Jul-2009 |
23:19 |
Неприменимо |
Secur32.dll |
6.1.7600.20667 |
22,016 |
13-Mar-2010 |
07:13 |
x86 |
Sspicli.dll |
6.1.7600.20667 |
96,768 |
13-Mar-2010 |
07:11 |
x86 |
Для всех поддерживаемых версий Windows Server 2008 R2 для систем на базе процессоров IA-64
Имя файла |
Версия файла |
Размер файла |
Дата |
Время |
Платформа |
---|---|---|---|---|---|
Cng.sys |
6.1.7600.16385 |
787,736 |
14-Jul-2009 |
01:52 |
IA-64 |
Ksecdd.sys |
6.1.7600.20667 |
179,600 |
13-Mar-2010 |
06:42 |
IA-64 |
Ksecpkg.sys |
6.1.7600.20667 |
307,088 |
13-Mar-2010 |
06:42 |
IA-64 |
Lsasrv.dll |
6.1.7600.20667 |
2,654,720 |
13-Mar-2010 |
06:34 |
IA-64 |
Lsasrv.mof |
Неприменимо |
13,780 |
10-Jun-2009 |
20:57 |
Неприменимо |
Lsass.exe |
6.1.7600.16385 |
56,320 |
14-Jul-2009 |
01:44 |
IA-64 |
Secur32.dll |
6.1.7600.16385 |
48,640 |
14-Jul-2009 |
01:48 |
IA-64 |
Sspicli.dll |
6.1.7600.20667 |
275,456 |
13-Mar-2010 |
06:38 |
IA-64 |
Sspisrv.dll |
6.1.7600.20667 |
45,568 |
13-Mar-2010 |
06:38 |
IA-64 |
Lsasrv.mof |
Неприменимо |
13,780 |
22-Jul-2009 |
23:19 |
Неприменимо |
Secur32.dll |
6.1.7600.20667 |
22,016 |
13-Mar-2010 |
07:13 |
x86 |
Sspicli.dll |
6.1.7600.20667 |
96,768 |
13-Mar-2010 |
07:11 |
x86 |
Статус
Корпорация Майкрософт подтверждает, что это проблема продуктов Майкрософт, перечисленных в разделе «Относится к».
Дополнительные сведения
Дополнительные сведения о настройке порта с помощью SSL-сертификат, посетите следующий веб-узел корпорации Майкрософт:
Описание 824684 Стандартные термины, используемые при описании обновлений программных продуктов Майкрософт
Сведения о дополнительных файлах
Сведения о дополнительных файлах для Windows 7 и Windows Server 2008 R2
Дополнительные файлы для всех поддерживаемых 86-разрядных версий Windows 7
Имя файла |
Update.mum |
Версия файла |
Неприменимо |
Размер файла |
1,674 |
Дата (UTC) |
13-Mar-2010 |
Время (UTC) |
10:55 |
Платформа |
Неприменимо |
Имя файла |
X86_1421ac8a9f6ef3ce8b937b0ae56209ae_31bf3856ad364e35_6.1.7600.20667_none_23708961b103e635.manifest |
Версия файла |
Неприменимо |
Размер файла |
691 |
Дата (UTC) |
13-Mar-2010 |
Время (UTC) |
10:55 |
Платформа |
Неприменимо |
Имя файла |
X86_microsoft-windows-lsa_31bf3856ad364e35_6.1.7600.20667_none_a6c221e8d72a628b.manifest |
Версия файла |
Неприменимо |
Размер файла |
103,660 |
Дата (UTC) |
13-Mar-2010 |
Время (UTC) |
11:02 |
Платформа |
Неприменимо |
Дополнительные файлы для всех поддерживаемых 64-разрядных версий Windows 7 и Windows Server 2008 R2
Имя файла |
Amd64_c1f3ccb091321f5245e74fc410074621_31bf3856ad364e35_6.1.7600.20667_none_649488b89ab1f4e7.manifest |
Версия файла |
Неприменимо |
Размер файла |
1,032 |
Дата (UTC) |
13-Mar-2010 |
Время (UTC) |
10:55 |
Платформа |
Неприменимо |
Имя файла |
Amd64_efb13a188cefafdfd852e77573ce5875_31bf3856ad364e35_6.1.7600.20667_none_664f738e7e9b11f8.manifest |
Версия файла |
Неприменимо |
Размер файла |
695 |
Дата (UTC) |
13-Mar-2010 |
Время (UTC) |
10:55 |
Платформа |
Неприменимо |
Имя файла |
Amd64_microsoft-windows-lsa_31bf3856ad364e35_6.1.7600.20667_none_02e0bd6c8f87d3c1.manifest |
Версия файла |
Неприменимо |
Размер файла |
103,664 |
Дата (UTC) |
13-Mar-2010 |
Время (UTC) |
11:05 |
Платформа |
Неприменимо |
Имя файла |
Update.mum |
Версия файла |
Неприменимо |
Размер файла |
1,906 |
Дата (UTC) |
13-Mar-2010 |
Время (UTC) |
10:55 |
Платформа |
Неприменимо |
Имя файла |
Wow64_microsoft-windows-lsa_31bf3856ad364e35_6.1.7600.20667_none_0d3567bec3e895bc.manifest |
Версия файла |
Неприменимо |
Размер файла |
86,382 |
Дата (UTC) |
13-Mar-2010 |
Время (UTC) |
07:37 |
Платформа |
Неприменимо |
Дополнительные файлы для всех поддерживаемых версий Windows Server 2008 R2 с архитектурой IA-64
Имя файла |
Ia64_aba017386f21d586120feaa3c20f5705_31bf3856ad364e35_6.1.7600.20667_none_3341405f4af61718.manifest |
Версия файла |
Неприменимо |
Размер файла |
1,030 |
Дата (UTC) |
13-Mar-2010 |
Время (UTC) |
10:55 |
Платформа |
Неприменимо |
Имя файла |
Ia64_microsoft-windows-lsa_31bf3856ad364e35_6.1.7600.20667_none_a6c3c5ded7286b87.manifest |
Версия файла |
Неприменимо |
Размер файла |
103,662 |
Дата (UTC) |
13-Mar-2010 |
Время (UTC) |
10:55 |
Платформа |
Неприменимо |
Имя файла |
Update.mum |
Версия файла |
Неприменимо |
Размер файла |
1,684 |
Дата (UTC) |
13-Mar-2010 |
Время (UTC) |
10:55 |
Платформа |
Неприменимо |
Имя файла |
Wow64_microsoft-windows-lsa_31bf3856ad364e35_6.1.7600.20667_none_0d3567bec3e895bc.manifest |
Версия файла |
Неприменимо |
Размер файла |
86,382 |
Дата (UTC) |
13-Mar-2010 |
Время (UTC) |
07:37 |
Платформа |
Неприменимо |
К сожалению, не было никакого реального решения этой проблемы, поскольку у NetApp есть дело, открытое с Microsoft для Windows Server 2008 с использованием SMBv2 или SMBv3.
Единственный обходной путь для этой конкретной ошибки — заставить администраторов сети отключить параметр объекта групповой политики для «Доступ к сети: не разрешать хранение паролей и учетных данных для проверки подлинности», который изначально не был предназначен для открытия дела в NetApp или для публикации здесь.
Для всех, кто заинтересован, NetApp предоставил следующее:
ID ошибки: 837425
Тип ошибки: CIFS
Описание: при определенных обстоятельствах попытки подключения к общему ресурсу CIFS завершаются неудачно со следующим сообщением об ошибке: «Произошла системная ошибка 1312. Указанный сеанс входа в систему не существует. Возможно, он уже завершен».
Проблема возникает для клиентов Windows SMB 2 и SMB 3, таких как Windows 7, Vista и Windows 8. Проблема возникает, когда учетные данные указываются при подключении к общему ресурсу, например, в следующем примере:
net use * servershare /user:domainuser password
Проблема не возникает на клиентах SMB 1, таких как Windows XP, поэтому использование клиентов SMB 1 для подключения к общему ресурсу является обходным решением. Однако обратите внимание, что проблема по-прежнему возникает для клиентов SMB 2 и SMB 3, таких как Windows 7 и Windows 8, даже если SMB 2 и SMB 3 отключены на SVM и клиенты подключаются с использованием SMB 1.
Примечания: Когда исправление для ошибки 746314 станет доступным, оно послужит обходным путем для этой проблемы.
В идеале это нужно было сделать сразу после генерации нового сертификата Вот здесь описано как создать сертификат
Но, я этого не сделал. И после перезагрузки сервера я 3 часа ломал голову почему у меня не работает почта. Но благо я нашел решение. для начала выполняем в PowerShell
netsh http show sslcert
Нам это окно выдаст список сертификатов что есть, выделите все и скопируйте в текстовый документ, это нам еще пригодится.
Дальше :
netsh http delete sslcert ipport=0.0.0.0:444
Этим мы удалили старый сертификат что был привязан к 444 порту. Теперь в идеале должюна была сработать команда:
netsh http add sslcert ipport=0.0.0.0:444 certhash=ХЕШ СУММА СЕРТИФИКАТА appid=»{4dc3e181-e1445554554155455}»
certhash= и appid= я брал с того текстового документа что мы создали. Но сейчас когда начал писать эту статью, я понял что нужно было указать эту хеш сумму и эппайди от нового сертификата, тогда бы эта команда сработала….
Но! Я писал хеш старого сертификата и еппайди старого сертификата и я получил ошибку:
Сбой добавления сертификата SSL. Ошибка: 1312
Указанный сеанс работы не существует. Возможно, он уже завершен.
________________
Тут то я и застрял.
Но решение было найдено
Заходим в Диспетчер IIS
открываем сайт
открываем порт 444 и выбираем новый сертификат что мы генерировали. Жмем ОК. Перегружаем IIS или сервер целиком… И вуаля) Я вас поздравляю!!!)
- Remove From My Forums
-
General discussion
-
Hello,
we are having the following issue:
http://support.microsoft.com/default.aspx?scid=kb;en-us;968264&sd=rss&spid=11737
BUG:
When psremoting (or winrs-ing) onto a client Win7x64 machine, trying to mount a
DFS UNC, it fails with the following error.[client-1]: PS C:UsersuserDocuments> net use x:\serverdfsshare /User:companyusername ******
net.exe : System error 1312 has occurred.
+ CategoryInfo : NotSpecified: (System error 1312 has occurred.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandErrorA specified logon session does not exist. It may already have been terminated.
On the same machine, when mounting another share (sysvol) it does not fail.
[client-1]: PS C:UsersuserDocuments> net use x:\serversysvol
/User:companyusername ******
The command completed successfully.If I run the same command on any client machine it does fail with the same error.
If I run the same command locally on that same client (client-1) as logged on interactive user, it does not fail.
I have written a service that monitors if my app is running and starts it if not. In result the app is run as a «system» user — which is the way I want it to be. I have several of those installations working properly.
The app should mount a network share that is in this case available on a linux samba server. The problem is that when running the command:
net use X: \IPshare_name /user:login password
an error is displayed:
System error 1312 has occured.
A specified logon session does not exist. It may already have been
terminated.
I have run some checks and it turns out that the X: drive in local system is available, the server is online, the share is available, the credentials are OK, there are no other net use sessions running in this system. Also I have found out a strange behavior: running identical command as a standard user gives proper results and the drive is mounted properly.
Do you have any suggestions what might be the problem and how to solve it?
Additionally I am not a domain member, and the system that shows the error is Windows 7 Pro. I have other machines in the same network that do work properly without the error.
asked Sep 5, 2016 at 8:17
I have had the same issue some time ago. It helped when I introduced a domain name (even if you are not a domain member) before the login.
I your case try this command:
net use X: \IPshare_name /user:whatEverlogin password
answered Sep 5, 2016 at 10:54
mdghostmdghost
3763 silver badges8 bronze badges
2
Test this command:
EXEC XP_CMDSHELL ‘net use Z: 192.168.3.55backupShare password@123 /User:domainuser’
answered Jun 16, 2020 at 3:49
1
I’ve just run into the same problem on upgrading to Windows 10 PE 2004 (19041). The older Windows 10 PE 1803 (17134) did not require the dot before the username.
Here’s the solution:
- Put the password before the user (this is the argument order given by net use /?).
- Add the server’s name, IP or a dot and then a backslash (
.
) before the username .
Use:
net use X: \IPshare_name password /user:.login
or
net use X: \IPshare_name password /user:IPlogin
If you have arguments with spaces, add parenthesis around them:
net use X: "\IPshare name" "pass word" /user:".test user"
answered Sep 21, 2021 at 17:09
Unfortunately there was no real solution to this problem, as NetApp does have a case open with Microsoft for Windows Server 2008 using SMBv2 or SMBv3.
The only workaround for this particular bug was to have the network Administrators disable the GPO setting for «Network access: Do not allow storage of passwords and credentials for authentication» which was not the original intent of opening a case with NetApp or posting on here.
For anybody who is interested, NetApp provided the following:
Bug ID: 837425
Bug Type: CIFS
Description: Under certain circumstances, attempts to connect to a CIFS share fail with the following error message: «System error 1312 has occurred. A specified logon session does not exist. It may already have been terminated.»
The problem occurs for SMB 2 and SMB 3 Windows clients such as Windows 7, Vista, and Windows 8. The problem occurs when credentials are specified while connected to a share, such as the following example:
net use * \servershare /user:domainuser password
The problem does not occur on SMB 1 clients such as Windows XP, so using SMB 1 clients to connect to share is a workaround. However, note that the problem still occurs for SMB 2 and SMB 3 clients like Windows 7 and Windows 8 even when SMB 2 and SMB 3 are disabled on the SVM and the clients connect using SMB 1.
Notes: When the fix for bug 746314 is available, it will serve as a workaround for this problem.