Net use системная ошибка 1219

Until Powershell takes over windows console completely, command prompt may be the simplest way to manage the issue.

  1. Start a command prompt

Start -> Run (or win-R) -> cmd.exe

  1. If you are attempting to mount a share on a server using a username that is different from the username for which you already have a connection to any share on the same server, you will first need to disconnect all connections to that server. You can view the connections using the below command.

net use

You will receive output similar to the following:

    New connections will not be remembered.
    
    Status       Local     Remote                    Network
    
    -------------------------------------------------------------------------------
    OK           G:        \srvshare               Microsoft Windows Network
    OK           H:        \fqdnuser$              Microsoft Windows Network
                           \zombie-srvshare        Microsoft Windows Network 
    The command completed successfully.

The «zombie-srvshare» entry is not necssarily a zombie. These kinds of entries are created when you use a unc path for any reason. (typing \servershare into explorer.exe for example)

  1. Remove all the existing shares for the server you want to create the new connection to:

net use \servershare /delete

Note that your share may actually be a deeper path, such as \serverhomedrivesmyusername

  1. At this point, you can attempt to reconnect.

net use \servershare /user:somedomainsomeusername

  1. If you still get the dreaded 1219 error, you can perform the following commands to restart the smb client service, known as lanmanworkstation. It is often the case that this will be necessary in instances where the server hosting the share you want to connect to is the same share that your active directory indicated home drive is connected automatically for you at logon.

To view extraneous service dependencies (such as vmware-converter-server) you can run sc enumdepend lanmanworkstation

To stop lanmanworkstation, you’ll need to first end the dependencies, commands for the standard dependencies follow.

sc stop netlogon

sc stop sessionenv

Then you can stop lanman workstation

sc stop lanmanworkstation

Then lastly, restart lanmanworkstation and then the dependencies

sc start lanmanworkstation

sc start sessionenv

sc start netlogon

At this point, you should be able to make a connection using another user:

net use \servershare /user:somedomainsomeusername

I am running Windows Vista Home Premium SP1 on my laptop.  I have a Fedora Core 7 server running SaMBa.  They share a /28 subnet (with 0, 6, and 7 taken by networking, 1 — 4 on the server, 5 on the laptop).

The server has multiple SaMBa shares (for this example, \myservershare1 and \myservershare2).  There are two SaMBA users, user1 and user2, each either their own passwords.  user1 can access \myservershare1 and user2 can access \myservershare2 .  I log on to the Vista laptop using a separate user/pass from either of those two accounts.

When I attempt to connect to these shares, I can do so without a problem if I connect to them singly using «connect using different user name».  However, if I attempt to connect to both simultaneously, I get:

«System error 1219 has occurred.

Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed.  Disconnect all previous connections to the server or shared resource and try again.»

I need to be able to connect to both shares simultaneously, but using the different credentials (I don’t want user1 creating files in \myservershare2 and I don’t want user2 creating files in \myservershare1).

I have tried manually using NET USE and I get the same error when I try to map the second drive after the first is mounted. I have also messed with regedit and changed HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlLsaLmCompatibilityLevel from 3 to 1 (a certain site suggested this).  I’ve also seen some DNS kludges that trick the windows client into thinking its connecting to multiple servers but I haven’t the capacity to arrange something like this easily — nor do I like the idea of using kludges to fix what should be a simple-to-fix scenario.

Is there a ‘correct’ work-around for this?

Вычислительная техника всегда полностью детерминирована. В ней нет полурешений или частичных ответов. Есть только нули, есть только единицы. И если что-то не работает, то оно не работает всегда и по вполне выявимой причине. Примерно так полагали отцы-основатели храма компьютера. А потом в вычислительном блоке завелись тараканы, маленькие такие жучки, которые стохастически бегали и замыкали контакты, что приводило к ошибкам, возникающим случайным образом, к ошибкам, которые не укладываются в детерминированную, жесткую модель двоичной вычислительной техники.

С тех пор не перфолент было испорчено, а программно-аппаратные комплексы, компьютеры с которыми мы работаем, стали на несколько десятков порядков более сложными. И ошибки в них возникают порой настолько экзотические, что решить их зачастую практически невозможно, так как легче переустановить заново Windows и сбросить Linux.

Перфолента винтажная

Перфолента винтажная

Именно о такой «ошибке» и пойдет дальше речь. Действие происходит в среде операционной системы Windows 10. Разрядность или редакция системы не имеет значения. При попытке подключения к сервису Samba удаленного сервера в локальной сети на Linux при использовании команды net use возникает ошибка множественного доступа:

System error 1219 has occurred.

Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again.

Ошибка будет возникать и при попытке подключиться к «расшареной папке» на удаленном сервере обычным проводником. Гугленье по номеру и описанию ошибки ни к каким позитивным результатам не приводит, так как ошибка настолько старая, что даже ссылки на базу знаний Microsoft ведут на страницу ошибки об отсутствии ошибки, а не на описание того, как с появившейся бедой справиться.

В моем случае я пытался подключать сетевой диск из командного файла. Операция проводилась командой:

NET USE B: \192.168.1.11BU BU2 /user:BUS /persistent:no

Где в качестве диска B: примонтировывалась папка BU с сервера, заданного IP-адресом 192.168.1.11. При этом подключение осуществлялось под пользователем BUS с паролем BU2. И подключение существовало до перезагрузки (или его можно было отключить командой NET USE B: /DELETE).

Но, начнем по порядку. Давным-давно, по причинам ведомым одним только разработчикам, да архитекторам Microsoft, сетевые подключения к сервисам удаленный папки (та самая Samba) жестко ограничивались только одним пользователем на один сервер. Что это значит? Это значит, что на один сервер можно подключиться только под одной парой Login/Password. И если вы уже открыли один такой сеанс и не отключились от него (а Windows обычно не отключает соединение, чтобы потом не тратить время на его подключение заново), то при второй попытке подключиться к этому же серверу возникает как раз ошибка 1219. Собственно, описание проблемы и способ ее решения приводится непосредственно при выводе кода 1219. Дескать надо убрать другие подключения, тогда все заработает.

Многие «решения» и советы в сети сводятся примерно к следующему:

1. Перезагрузиться. Самый универсальный совет. И таки да, все заработает, если, конечно, у вас нет какого-либо автоматического подключения к удаленному серверу по Samba в автозагрузке. (По этому поводу встречался и совсем экзотический вариант по перезагрузке сервиса Workstation, дескать быстрее, да и все остальное не закроется, но это уже какой-то Overkill).

2. Удалить существующие подключения без перезагрузки. Вариант немного сложнее, но работает не хуже. Для этого придется поработать руками. Заходим в командную строку Windows (мой любимый способ через Win-X и там уже выбрать). Вводим команду NET USE. Она возвращает нам список подключенных удаленных папок. Затем удаляем ненужное подключение через NET USE xxx /DELETE, где xxx тот ресурс в качестве которого у нас подключена удаленная папка. Либо же удаляем вообще все подключения через NET USE * /DELETE.

3. Далеко не у всех пункты 1 и 2 срабатывают. Поэтому самые hard-core users советуют заодно «почистить» всё остальное, что так или иначе касается сетевых подключений. Все делается там же, в командной строке, после проведения операции из пункта 2. Поочередно запускаем следующие команды:

ipconfig /release
ipconfig /flushdns
ipconfig /renew

Все вышеприведённые варианты должны, просто обязаны, помочь в проблеме. Но, что, если нет? Например, если NET USE возвращает, что у вас в системе нет никаких подключений? Мой NET USE просто отписывался «There are no entries in the list.», так как банально не видел подключений сделанных и сохраненных через проводника.

В таком случае поступаем другим, не менее интересным способом. Но для его понимания, нужно понять каким образом сетевой стек в Windows идентифицирует удаленные сервера. А делает он это очень просто. По какому сетевому имени к серверу подключаешься, так он его и запоминает. В моем варианте я подключался через проводник и в командном файле к серверу по его IP-адресу (192.168.1.11). Но ведь у сервера есть еще и его сетевое имя. У меня он зовется N3050. И вместо NET USE B: \192.168.1.11BU BU2 /user:BUS /persistent:no я могу вполне резонно воспользоваться NET USE B: \N3050BU BU2 /user:BUS /persistent:no и все заработает.

А если подключений к одному серверу с разными учетными данными требуется еще больше, то можно воспользоваться другой техникой: прописать в сетевые или локальные таблицы связей IP-адресов и имен дополнительные псевдонимы. В среде Windows проще всего изменить файл hosts, который обыкновенно гнездится по следующему пути WindowsSystem32driversetc.

В него можно прописать хоть десять, хоть сто псевдонимов одного и того же сервера и понаподключать такое количество подключений с разными учетками, какое только потребуется.



I have a network drive (for instance, G: on Server A). And I am trying to map an additional network drive (H:) to a new server (Server B). I tried the net use command, giving to rise to error 1219 on Window XP.

net use h: \ServerBdocs /user:ServerBuser Password 

I am connecting the network drive of Server A using Server A’s account. And I have to use both of network drive simultaeusly, so I don’t think I can the net use * /del command to connect to Server B.

What can I do?

Peter Mortensen's user avatar

asked Nov 8, 2010 at 6:18

Samuel.P's user avatar

1

Any util commands:

net use (to see all existing connections)

net use * /del /yes (to delete all existing connections)

Script

@echo off

set "svrname=server"
set "share=share$"
set "usr=administrator"
set "pwd=password"

for /f "tokens=2" %%# in ('net use^|find /i "\%svrname%"') do net use %%# /delete>nul

net use l: \%svrname%%share% /user:%usr% "%pwd%">nul

answered Mar 13, 2012 at 12:01

Kiquenet's user avatar

KiquenetKiquenet

14.4k35 gold badges147 silver badges243 bronze badges

If you use the server IP address instead of the DNS name, it gets around this silly Windows limitation.

So instead of

net use h: \ServerBdocs /user:ServerBuser Password 

If ‘Server’ has an IP address of 192.168.0.1 you can use

net use h: \192.168.0.1docs /user:ServerBuser Password 

Hope this helps

answered Nov 12, 2014 at 14:19

Mike's user avatar

1

When I log into windows, my system maps a few drives from our server’s shares. I have a backup script that I want to run and it maps a few more drives just for the script and then unmaps them when done.

I’m running the following to map:
net use z: «servershare1» /user:myuser password

It then says System error 1219 has occurred. Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. etc

Thing is, I’m using the same user for everything. Why would it give me this error and how do I fix this? I’m using Windows Server 2008 R2 with this script.

asked Mar 19, 2014 at 16:35

user277244's user avatar

4

Since at least Windows NT 4.0, only a single set of user credentials can be used for a single server name, where the server name is determined when mapping the resource (e.g. the server in servershare).

If using the same set of user credentials is acceptable, the additional server share can be successfully mapped by not specifying the user name or password. So, in your case, performing the first net use with the /user and password arguments and the second without should work.

If using the same set of credentials is not acceptable (i.e. you must map two resources from the same server using different user credentials), you can work around the problem by creating and using a DNS alias for the server, or using the server’s IP address.

See the following for additional details:

  • http://answers.microsoft.com/en-us/windows/forum/windows_vista-networking/the-network-folder-specified-is-currently-mapped/928f6313-fe2c-4d2d-a247-152ec022e062
  • http://support.microsoft.com/kb/938120
  • answered Nov 11, 2014 at 16:31

    Christopher Lewis's user avatar

    1

    Got it. A quick reboot fixed this issue. Thanks

    answered Mar 19, 2014 at 16:44

    user277244's user avatar

    user277244user277244

    2512 gold badges7 silver badges25 bronze badges

    1

  • Net time set ошибка 5
  • Net stop bits системная ошибка 5
  • Net start wuauserv ошибка 1058 win 10
  • Net start w32time системная ошибка 1290
  • Net start w32time системная ошибка 1058