WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Macbook will not connect to Samba share that has a password  (Read 4873 times)

Offline remus

  • Sr. Member
  • ****
  • Posts: 371
Macbook will not connect to Samba share that has a password
« on: April 30, 2018, 12:33:25 AM »
Hi all,

I've been using microcore + samba as a stable file server for many years now.

Microcore : 3.8.4
Samba : 3.4.5

Why the old versions ? Well the software versions was the current versions when I set this up. Its worked fine all these years and if it ain't broke I don't fix it.

But I have a new problem.
The new manager has a macbook pro. Its running the latest version of mac OS. I think OS version is 10.13 High Sierra.

The macbook is able to connect to all public shares on the file server.

But it fails to connect or even get to the username/password authentication prompt.

Code: [Select]
Here are some samples from the samba logs for that particular macbook pro
[2018/04/26 17:14:26,  1] smbd/service.c:1047(make_connection_snum)
  10.1.1.17 (10.1.1.17) connect to service installfiles initially as user tc (uid=1001, gid=50) (pid 26002)
[2018/04/26 17:14:26,  1] smbd/service.c:1047(make_connection_snum)
  10.1.1.17 (10.1.1.17) connect to service manager.scans initially as user tc (uid=1001, gid=50) (pid 26002)
[2018/04/26 17:14:46,  1] smbd/service.c:676(make_connection_snum)
  create_connection_server_info failed: NT_STATUS_WRONG_PASSWORD
[2018/04/26 17:14:46,  1] smbd/service.c:676(make_connection_snum)
  create_connection_server_info failed: NT_STATUS_WRONG_PASSWORD
[2018/04/26 17:16:26,  1] smbd/service.c:676(make_connection_snum)
  create_connection_server_info failed: NT_STATUS_WRONG_PASSWORD
[2018/04/26 17:16:26,  1] smbd/service.c:676(make_connection_snum)
  create_connection_server_info failed: NT_STATUS_WRONG_PASSWORD
[2018/04/26 17:45:01,  0] lib/util_sock.c:539(read_fd_with_timeout)
[2018/04/26 17:45:01,  0] lib/util_sock.c:1491(get_peer_addr_internal)
  getpeername failed. Error was Transport endpoint is not connected
  read_fd_with_timeout: client 0.0.0.0 read error = No route to host.
[2018/04/26 17:45:01,  0] lib/util_sock.c:738(write_data)
[2018/04/26 17:45:01,  0] lib/util_sock.c:1491(get_peer_addr_internal)
  getpeername failed. Error was Transport endpoint is not connected
  write_data: write failure in writing to client 0.0.0.0. Error Broken pipe
[2018/04/26 17:45:01,  0] smbd/process.c:62(srv_send_smb)
  Error writing 75 bytes to client. -1. (Transport endpoint is not connected)
[2018/04/26 17:45:01,  1] smbd/service.c:1226(close_cnum)
  10.1.1.17 (10.1.1.17) closed connection to service manager.scans
[2018/04/26 17:45:01,  1] smbd/service.c:1226(close_cnum)
  10.1.1.17 (10.1.1.17) closed connection to service installfiles
[2018/04/26 17:46:19,  0] lib/util_sock.c:539(read_fd_with_timeout)
[2018/04/26 17:46:19,  0] lib/util_sock.c:1491(get_peer_addr_internal)
  getpeername failed. Error was Transport endpoint is not connected
  read_fd_with_timeout: client 0.0.0.0 read error = No route to host.

Here's my smb.conf file

Code: [Select]
[global]
workgroup = workgroup
name resolve order = bcast lmhosts host wins

netbios name = afs
security = share

log file = /mnt/hda1/sambalogs/%m
log level = 1
max log size = 50
debug timestamp = yes

load printers = no
show add printer wizard = no
printcap name = /dev/null
disable spoolss = yes

[installfiles]
path = /mnt/hda1/shares/installfiles
read only = no
guest ok = yes
force user = tc
force group = staff

[manager.scans]
path = /mnt/hda1/shares/manager.scans
read only = no
guest ok = yes
force user = tc
force group = staff

[mac]
path = /mnt/hda1/shares/mac.password.test
read only = no
guest ok = no
valid users = @manager

The mac can connect to installfiles and manager.scans shares as they have no password.
The mac is unable to connect to the mac share, this is the share that has a password.
I am able to connect to the mac share from a windows 7 pro computer, using the correct username and password.

Hoping someone can help shed some light on this strange problem.

All comments and suggestions welcome.

Thanks for your contributions :)
Live long and prosper.

Offline remus

  • Sr. Member
  • ****
  • Posts: 371
Re: Macbook will not connect to Samba share that has a password
« Reply #1 on: May 02, 2018, 10:57:33 PM »
H all,

I"m setting up a mc9 to see if I get a solution to the mac password problem with updated samba software.

was going through the motions, and was about to make mods to my sudoers file with visudo and got this

Code: [Select]
$ sudo visudo
visudo: no editor found (editor path = /usr/bin/vi)

I'm wondering if I need to install the visudo package somehow ?

I've tried tce-load -wi sudo , visudo with no luck

Or do I need to simply change my habits with mc ?
Live long and prosper.

Offline remus

  • Sr. Member
  • ****
  • Posts: 371
Re: Macbook will not connect to Samba share that has a password
« Reply #2 on: May 02, 2018, 11:00:32 PM »
So I thought I would manually edit my /etc/sudoers file

Code: [Select]
sudo chmod 660 /etc/sudoers
sudo vi /etc/sudoers
sudo: /etc/sudoers is mode 0660, should be 0440
sudo: no valid sudoers sources found, quitting

Any comments and suggestions welcome
Live long and prosper.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11631
Re: Macbook will not connect to Samba share that has a password
« Reply #3 on: May 02, 2018, 11:17:21 PM »
Hi remus
Code: [Select]
$ sudo visudo
visudo: no editor found (editor path = /usr/bin/vi)

I'm wondering if I need to install the visudo package somehow ?

That message says that  visudo  is present. Maybe create a link from busybox vi to /usr/bin/vi.

Offline remus

  • Sr. Member
  • ****
  • Posts: 371
Re: Macbook will not connect to Samba share that has a password
« Reply #4 on: May 03, 2018, 01:32:42 AM »
Thanks Rich

Code: [Select]
sudo ln -s /bin/vi /usr/bin/vi
Did the trick :)
Live long and prosper.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11631
Re: Macbook will not connect to Samba share that has a password
« Reply #5 on: May 03, 2018, 09:15:12 AM »
Hi remus
Glad to hear you fixed it. In TC4 the  busybox vi  link is in  /usr/bin/vi.  I'm guessing someone may have thought it was misplaced
and moved it to  /bin/vi  which then broke  visudo.

Online patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 713
Re: Macbook will not connect to Samba share that has a password
« Reply #6 on: May 03, 2018, 01:14:13 PM »
If you don't comfortable with VI you can use nano with visudo like this.

Code: (bash) [Select]
sudo EDITOR=nano visudo

Offline remus

  • Sr. Member
  • ****
  • Posts: 371
Re: Macbook will not connect to Samba share that has a password
« Reply #7 on: May 08, 2018, 02:52:09 AM »
Hi remus
Glad to hear you fixed it. In TC4 the  busybox vi  link is in  /usr/bin/vi.  I'm guessing someone may have thought it was misplaced
and moved it to  /bin/vi  which then broke  visudo.

Yeah, visudo is still there, doesn't need installing, I just had to use this to get it working

Code: [Select]
sudo ln -s /bin/vi /usr/bin/vi
Perhaps someone should tell somebody ?
Live long and prosper.

Offline remus

  • Sr. Member
  • ****
  • Posts: 371
Re: Macbook will not connect to Samba share that has a password
« Reply #8 on: May 08, 2018, 02:53:34 AM »
If you don't comfortable with VI you can use nano with visudo like this.

Code: (bash) [Select]
sudo EDITOR=nano visudo

Thanks for the suggestion patrikg,

I'm wondering if all the validation and checks still get executed ?

I think I read somewhere that visudo does some kind of sanity check ?

I could be wrong :)
Live long and prosper.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Macbook will not connect to Samba share that has a password
« Reply #9 on: May 08, 2018, 03:11:25 AM »
The checks happen regardless of editor.
The only barriers that can stop you are the ones you create yourself.