Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Samba: Using Linux to access files on Mac OS X
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
F_
Tux's lil' helper
Tux's lil' helper


Joined: 31 Dec 2006
Posts: 133

PostPosted: Sun Jan 11, 2015 3:11 am    Post subject: Samba: Using Linux to access files on Mac OS X Reply with quote

Hi Gentoo Forums,

I have tried over the past several days, unsuccessfully, to have my Linux client access folders and files shared under Mac OS X server.


Mac OS X Info:
Version 10.9.5
Username: AJames
Hostname: bulbasaur
Steps I took to share a directory:

  • System Preferences
  • Sharing
  • File Sharing
  • Add Shared Folders and let Everyone have Read Only access.
  • Under "Options" I have selected "Share files and folders using SMB"


Linux Info:
Linux beedrill 3.17.7-gentoo #1 SMP Mon Dec 29 01:20:27 2014 x86_64 Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz GenuineIntel GNU/Linux
Username: f_
Hostname: beedrill
Samba 3.6.24 installed with the following USE flags: acl aio client cups netap pam readline server smbclient winbind

/etc/samba/smb.conf
Code:

[global]
   workgroup = WORKGROUP
   server string = Samba Server
   security = user
hosts allow = 127.0.0.1 192.168.0.
   log file = /var/log/samba/log.%m
   max log size = 50
interfaces = lo eth0 enp0s25 wlan0 wlp2s0
   dns proxy = no
[homes]
   comment = Home Directories
   browseable = no
   writable = yes
[public]
   comment = Public Stuff
   path = /home/f/public
   public = yes
   writable = yes
   printable = no


/etc/hosts
Code:

127.0.0.1       localhost
::1             localhost
192.168.0.5     bulbasaur


# cat /usr/src/linux/.config | grep -i cifs
Code:

CONFIG_CIFS=m
# CONFIG_CIFS_STATS is not set
# CONFIG_CIFS_WEAK_PW_HASH is not set
# CONFIG_CIFS_UPCALL is not set
CONFIG_CIFS_XATTR=y
CONFIG_CIFS_POSIX=y
# CONFIG_CIFS_ACL is not set
CONFIG_CIFS_DEBUG=y
# CONFIG_CIFS_DEBUG2 is not set
# CONFIG_CIFS_DFS_UPCALL is not set
# CONFIG_CIFS_SMB2 is not set


# smbtree -U AJames
Code:

# smbtree -U AJames
Enter AJames's password:
WORKGROUP
        \\BULBASAUR                     bulbasaur
        \\BRW008092AAD473
        \\BEEDRILL                      Samba Server
                \\BEEDRILL\IPC$                 IPC Service (Samba Server)
                \\BEEDRILL\public               Public Stuff



Error Messages:
But, when I try to login from my Linux client I use the following command but get the following error:
Code:

$ smbclient -L bulbasaur -U AJames
Enter AJames's password:
session setup failed: NT_STATUS_LOGON_FAILURE


I made some edits to on my Mac OS X to /System/Library/LaunchDaemons/com.apple.smbd.plist as written out here: http://web.stanford.edu/group/macosxsig/blog/2011/08/enable-logging-with-107-smbx-w.html

So when I run 'syslog -w' on my Mac OS X I get the following while I try to connect unsuccessfully from my Linux client:
Code:

Jan 10 21:53:35 bulbasaur.local digest-service[22610] <Notice>: label: default
Jan 10 21:53:35 bulbasaur.local digest-service[22610] <Notice>:         dbname: od:/Local/Default
Jan 10 21:53:35 bulbasaur.local digest-service[22610] <Notice>:         mkey_file: /var/db/krb5kdc/m-key
Jan 10 21:53:35 bulbasaur.local digest-service[22610] <Notice>:         acl_file: /var/db/krb5kdc/kadmind.acl
Jan 10 21:53:35 bulbasaur.local digest-service[22610] <Notice>: digest-request: uid=0
Jan 10 21:53:35 bulbasaur.local digest-service[22610] <Notice>: digest-request: netr probe 0
Jan 10 21:53:35 bulbasaur.local digest-service[22610] <Notice>: digest-request: init request
Jan 10 21:53:35 bulbasaur.local digest-service[22610] <Notice>: digest-request: init return domain: BULBASAUR server: BULBASAUR indomain was: <NULL>
Jan 10 21:53:35 bulbasaur.local digest-service[22610] <Notice>: digest-request: uid=0
Jan 10 21:53:35 bulbasaur.local digest-service[22610] <Notice>: digest-request: init request
Jan 10 21:53:35 bulbasaur.local digest-service[22610] <Notice>: digest-request: init return domain: BULBASAUR server: BULBASAUR indomain was: <NULL>
Jan 10 21:53:35 bulbasaur.local digest-service[22610] <Notice>: digest-request: uid=0
Jan 10 21:53:35 bulbasaur.local digest-service[22610] <Notice>: digest-request: init request
Jan 10 21:53:35 bulbasaur.local digest-service[22610] <Notice>: digest-request: init return domain: BULBASAUR server: BULBASAUR indomain was: <NULL>
Jan 10 21:53:35 bulbasaur.local digest-service[22610] <Notice>: digest-request: uid=0
Jan 10 21:53:35 bulbasaur.local digest-service[22610] <Notice>: digest-request: od failed with 2 proto=ntlmv2
Jan 10 21:53:35 bulbasaur.local digest-service[22610] <Notice>: digest-request: user=WORKGROUP\AJames
Jan 10 21:53:35 bulbasaur.local digest-service[22610] <Notice>: digest-request: kdc failed with -1561745659 proto=ntlmv2
Jan 10 21:53:35 bulbasaur.local digest-service[22610] <Notice>: digest-request: guest failed with 22 proto=ntlmv2



I'm really not sure what I'm doing wrong here. Is there something obvious I'm doing wrong?

Thanks in advance.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 6968

PostPosted: Sun Jan 11, 2015 9:52 am    Post subject: Reply with quote

Why do you use samba? I have no doubt OS/X have ms sharing too, but i doubt OS/X doesn't have nfs also.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 6972
Location: Saint Amant, Acadiana

PostPosted: Sun Jan 11, 2015 1:44 pm    Post subject: Reply with quote

Yes, NFS works well. Not sure if it can be fully configured in GUI, though. I know I had to drop to CLI in 10.2 to mount NFS shares automatically at boot.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
F_
Tux's lil' helper
Tux's lil' helper


Joined: 31 Dec 2006
Posts: 133

PostPosted: Sun Jan 11, 2015 5:28 pm    Post subject: Reply with quote

Thanks for your responses krinn & Jaglover.

The reason I'm using Samba is (1) because I have a network printer that is currently working correctly with all computers on the network, and (2) I plan on adding Windows boxes to this network in the near future that I would like to share files with.

Besides, I have prior experience with Samba and not with NFS, and feel more comfortable using it. I have correctly set up the Samba server on my Linux box so that my Mac can access files on the Linux box. It's just going the other way that is causing all the headache right now.


Best,
F_
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 6972
Location: Saint Amant, Acadiana

PostPosted: Sun Jan 11, 2015 5:33 pm    Post subject: Reply with quote

You can share your files using Samba and NFS simultaneously.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
F_
Tux's lil' helper
Tux's lil' helper


Joined: 31 Dec 2006
Posts: 133

PostPosted: Sun Jan 11, 2015 8:31 pm    Post subject: Reply with quote

Jaglover wrote:
You can share your files using Samba and NFS simultaneously.


So?
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 6972
Location: Saint Amant, Acadiana

PostPosted: Sun Jan 11, 2015 8:33 pm    Post subject: Reply with quote

F_ wrote:
Jaglover wrote:
You can share your files using Samba and NFS simultaneously.


So?


So share your volume using Samba for Windows clients and using NFS for *nix clients.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
F_
Tux's lil' helper
Tux's lil' helper


Joined: 31 Dec 2006
Posts: 133

PostPosted: Sun Jan 11, 2015 9:31 pm    Post subject: Reply with quote

Jaglover wrote:
F_ wrote:
Jaglover wrote:
You can share your files using Samba and NFS simultaneously.


So?


So share your volume using Samba for Windows clients and using NFS for *nix clients.


No thank you. I want to try to solve this using only one protocol: SMB/CIFS.
Back to top
View user's profile Send private message
salahx
Guru
Guru


Joined: 12 Mar 2005
Posts: 437

PostPosted: Wed Jan 14, 2015 5:56 am    Post subject: Reply with quote

Turn out I get the same thing, but I was able to fix it. Turns out the problem is the Mac, not Linux.

Go to System Preferences -> Sharing -> File Sharing and click "Options". Under "Windows File Sharing" locate your name and check the little box by it. If its greyed out, go to System Preferences -> Useres and Groups -> [Your username] -> Change Pasword and choose "Use Separate Password"

And it works...sorta. The authentication error is gone, but now a NEW error occurs:
Code:

Domain=[MACBOOKPRO-XXXX] OS=[Darwin] Server=[@(#)PROGRAM:smbd  PROJECT:smbx-327]
tree connect failed: NT_STATUS_PIPE_BROKEN
Maybe you'll have more luck.
Back to top
View user's profile Send private message
F_
Tux's lil' helper
Tux's lil' helper


Joined: 31 Dec 2006
Posts: 133

PostPosted: Thu Jan 15, 2015 1:14 am    Post subject: Reply with quote

Hi salahx,

Thanks for your e-mail. Unfortunately, I don't seem to have the "Use Separate Password" option where you say it should be. I just get the option to change my password and set up a hint. I've made sure my name is check-marked under System Preferences -> Sharing -> File Sharing -> Options.


As a general update, I did notice that I was using an old version of Samba. For some reason, Samba 3.6 is the most recent version in portage. I unmasked version 4.1.15 and tried once more. However, this didn't seem to make any noticeable change, as I still get the same error messages as before:

Code:

# smbclient -V
Version 4.1.14

# smbtree -U AJames
Enter AJames's password:
WORKGROUP
        \\BULBASAUR                     bulbasaur
        \\BRW008092AAD473
        \\BEEDRILL                      Samba Server
                \\BEEDRILL\IPC$                 IPC Service (Samba Server)
                \\BEEDRILL\public               Public Stuff

# smbclient -L bulbasaur -U AJames
Enter AJames's password:
session setup failed: NT_STATUS_LOGON_FAILURE

# mount.cifs //bulbasaur/Users/AJames/Public /mnt/osx -o username=AJames
Password for AJames@//bulbasaur/Users/AJames/Public:
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

# mount.cifs //bulbasaur/Users/AJames/Public /mnt/osx -o sec=ntlmv2,username=AJames
Password for AJames@//bulbasaur/Users/AJames/Public:
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)


(Note the -o sec=ntlmv2 option that I have been playing with, to no avail.)


Best Regards,
F_
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum