up vote 4 down vote favorite
3
share [g+] share [fb]

I have a machine running Ubuntu with Samba that I use to share stuff with my family's Windows machines in our local network. Currently they access a share for movies/music/etc with one user.

I want to connect them to another share as a different user (for example, user "goytacaz").

When I try connecting to this new share, Windows gives me "Error 1219" and complains about multiple connections by the same user.

How do I get my machine to accept multiple connections by the same user?

link|improve this question
Are you just looking to connect using samba? Samba already supports this AFAIK. – heavyd Jan 14 '10 at 17:32
feedback

migrated from stackoverflow.com Jan 14 '10 at 17:16

This question came from our site for professional and enthusiast programmers.

3 Answers

Over Samba? There shouldn't be any problems; as long as the username & password are correct both connections should happen correctly.

Update: re: "Error 1219". This is a client-side error -- Windows only allows you to connect to a server as one user at a time. (See Microsoft documentation at KB938120.) This means the Windows machine has already connected as a different user, and so your attempts to connect again, as the correct user, are failing.

You need to disconnect the first connection before you can reconnect. Two ways I know of to do that:

  • Disconnect any reconnect-at-logon network drives from that server. Reboot. Reconnect to the server and make sure you give the proper username and password.

  • Use the net use /delete command from Windows' command shell (Start -> Run -> cmd; at the prompt type the command; you may need to specify a share name).

Update 2: If the users are already connecting to the server with one user, you won't be able to let them connect with a second user. You'll have to reconsider your share strategy, and reconfigure Samba to follow that strategy. (This isn't your fault; I blame Windows.)

Personally, I'd stick with individual users for each person, and consider using groups to control access to the shares. This works well if you have some shares that you want everyone to have read-write access to, and others that you want to be read-only for all but a select few users.

Update 3: The MS document linked above offers these two workarounds to enable connecting to the server as separate users. The general idea is, make Windows think it's connecting to a different server by using a different name.

  1. Use the IP address of the server when you connect with the second username. (Use \\ServerName\sharename when connecting as the first user, but use \\X.X.X.X\sharename when connecting as the second user.)

  2. Create one or more DNS alias(es) for the server to use when you connect with the second (, third, fourth...) username. (Use \\ServerName\sharename when connecting as the first user, but use \\ServerAlias1\sharename when connecting as the second user, \\ServerAlias2\sharename when connecting as the third user, etc.)

link|improve this answer
Thank you for this answer. I had the same issue, and connecting using the server's IP address instead of DNS name worked for me for the second connection. – Ben Torell May 25 '10 at 15:43
feedback

i was just having the same issue.

for one user i use: \192.168.x.x <-- IP of the ubuntu server for the other user: \server-name <-- hostname of the ubuntu server.

this allowed me to connect with a windows machine using different logins.

link|improve this answer
feedback

use the IP address (or host name if you use the IP address) of the server

http://support.microsoft.com/kb/938120

link|improve this answer
feedback

Your Answer

 
or
required, but never shown