Hi,
After setting up the latest version of Mint ie 18.2 and installing system-samba-config, I have set up a fileshare folder that thanks to Altair on here is now set with the right permissions, now if I set in Samba gui to allow anyone to read & write to the fileshare then with my windows 10 machine I can see the drive and successfully read & write the files, however if I use a name that I set up in Samba and is the same name as my windows user I get this message when I try to connect:
An error occurred while reconnecting Z: to \\MINTY-SERVER\Fileshares Microsoft Windows Network: The Local device name is already in use. This connection has not been restored.
Now I am thinking why has it not asked me for the Samba password that I set up ?
Do the Samba allowed users need to be listed in the smb.conf file also ?
I have trawled Youtube for a video on this but I can't seem to find anything about setting up the Windows end if you are using Samba names and passwords
As always any info is greatly appreciated
Thanks in advance
Stuart
Samba and Windows usernames ! (SOLVED)
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Samba and Windows usernames ! (SOLVED)
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Samba and Windows usernames !
One of the last advantages for me to continue to post in the Mint forum is that I get to see smb / samba error messages I've never seen before.An error occurred while reconnecting Z: to \\MINTY-SERVER\Fileshares Microsoft Windows Network: The Local device name is already in use. This connection has not been restored.
If I read that error message literally the issue is with "Z". It's already used or possibly mapped by another device on the WIn10 box.
You really need to tell people how you are set up. Posting the output of the following commands will tell us that:
Code: Select all
testparm -s
Code: Select all
net usershare info --long
Windows does something Samba would never do. When a Windows client accesses a SMB / Samba server it passes the local Windows user name and login password automatically without the users knowledge. If the same user exists on the Samba server and the samba password matches the Windows password credentials are automatically passed and verified so you don't need to get prompted.Now I am thinking why has it not asked me for the Samba password that I set up ?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Re: Samba and Windows usernames !
Hi Altair,
To the rescue again, I have done as you suggested and this is my output:
stuart@Minty-Server ~ $ testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
WARNING: The "syslog" option is deprecated
Processing section "[printers]"
Processing section "[print$]"
Processing section "[Fileshares]"
Loaded services file OK.
Server role: ROLE_STANDALONE
# Global parameters
[global]
server string = %h server (Samba, Ubuntu)
server role = standalone server
map to guest = Bad User
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
unix password sync = Yes
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
dns proxy = No
usershare allow guests = Yes
panic action = /usr/share/samba/panic-action %d
idmap config * : backend = tdb
force user = stuart
[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
printable = Yes
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
[Fileshares]
comment = Test Folder
path = /home/stuart/Fileshares
valid users = stuart nobody acest
read only = No
create mask = 0770
stuart@Minty-Server ~ $ net usershare info --long
[Fileshares]
path=/home/stuart/Fileshares
comment=
usershare_acl=Everyone:F,
guest_ok=y
stuart@Minty-Server ~ $
Very intersting info about the passwords, does this mean that in my Samba users I need to have the same windows usernames and also their windows passwords ?
Thanks
Stuart
To the rescue again, I have done as you suggested and this is my output:
stuart@Minty-Server ~ $ testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
WARNING: The "syslog" option is deprecated
Processing section "[printers]"
Processing section "[print$]"
Processing section "[Fileshares]"
Loaded services file OK.
Server role: ROLE_STANDALONE
# Global parameters
[global]
server string = %h server (Samba, Ubuntu)
server role = standalone server
map to guest = Bad User
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
unix password sync = Yes
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
dns proxy = No
usershare allow guests = Yes
panic action = /usr/share/samba/panic-action %d
idmap config * : backend = tdb
force user = stuart
[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
printable = Yes
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
[Fileshares]
comment = Test Folder
path = /home/stuart/Fileshares
valid users = stuart nobody acest
read only = No
create mask = 0770
stuart@Minty-Server ~ $ net usershare info --long
[Fileshares]
path=/home/stuart/Fileshares
comment=
usershare_acl=Everyone:F,
guest_ok=y
stuart@Minty-Server ~ $
Very intersting info about the passwords, does this mean that in my Samba users I need to have the same windows usernames and also their windows passwords ?
Thanks
Stuart
Re: Samba and Windows usernames !
You can create a samba share two differnt ways:
[1] Samba Classic Share - it's share definition is in /etc/samba/smb.conf. You can edit smb.conf directly to do this or you can use something like system-config-samba. You have one of those:
I honestly have no idea which share definition Samba will obey. You can use both methods at the same time but not with the same label and not with different settings. Get rid of one or the other.
[1] Samba Classic Share - it's share definition is in /etc/samba/smb.conf. You can edit smb.conf directly to do this or you can use something like system-config-samba. You have one of those:
[2] Samba Usershare - it's share definition is in /var/lib/samba/usershares and is normally created through the file manager. You have one of those as well:[Fileshares]
comment = Test Folder
path = /home/stuart/Fileshares
valid users = stuart nobody acest
read only = No
create mask = 0770
You might see the problem here. 2 Shares, with the same label, pointing to the same folder, with different settings. The Classic Share only allows certain users. The Usershare allows everyone and your Aunt Tilly access.[Fileshares]
path=/home/stuart/Fileshares
comment=
usershare_acl=Everyone:F,
guest_ok=y
I honestly have no idea which share definition Samba will obey. You can use both methods at the same time but not with the same label and not with different settings. Get rid of one or the other.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Re: Samba and Windows usernames !
Hi Altair,
I will rem them out 1 at a time and see what happens, this has occurred because I have been trying to learn from videos on youtube that are up to 9 years old and there does not seem to be any recent stuff so I am following or trying to follow tutorials that end up not working because the software that is being used has been unavailable for some time , also I took a backup of the smb.conf file off my non working computer network at my work premises to see if i could work out how it worked, as ever though thank you for sharing your knowledge it is greatly appreciated, I might try sharing to all tomorrow and see if that works.
cheers
Stuart
I will rem them out 1 at a time and see what happens, this has occurred because I have been trying to learn from videos on youtube that are up to 9 years old and there does not seem to be any recent stuff so I am following or trying to follow tutorials that end up not working because the software that is being used has been unavailable for some time , also I took a backup of the smb.conf file off my non working computer network at my work premises to see if i could work out how it worked, as ever though thank you for sharing your knowledge it is greatly appreciated, I might try sharing to all tomorrow and see if that works.
cheers
Stuart
Re: Samba and Windows usernames !
Hi Altair,
Kept the Classic and remmed out the usershare, rebooted windows and working fine, thanks for your knowledge once again, I have also just looked for books on the subject on Amazon as I would love to learn more but there is just nothing recent available, if you know of anything that would be a bonus...
cheers
Stuart
p.s. does this forum allow you to give thanks, Karma, as I would like to show my thanks
Kept the Classic and remmed out the usershare, rebooted windows and working fine, thanks for your knowledge once again, I have also just looked for books on the subject on Amazon as I would love to learn more but there is just nothing recent available, if you know of anything that would be a bonus...
cheers
Stuart
p.s. does this forum allow you to give thanks, Karma, as I would like to show my thanks
Re: Samba and Windows usernames ! (SOLVED)
I don't know of any but even if there was something current it would be outdated by the time you received it. Such is the curse of open source. Write something for WinXP and it could be used for a decade. Write something for Linux and it's current for 6 months.I have also just looked for books on the subject on Amazon as I would love to learn more but there is just nothing recent available, if you know of anything that would be a bonus...
Nope. This is a rough neighbourhood. A responder is only as good as the next question and each questioner takes their chances that the responder knows what he's talking about.p.s. does this forum allow you to give thanks, Karma, as I would like to show my thanks
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.