[Help] MAC continually logs in via SAMBA as guest

Questions about using NAS on Mac OS.
User avatar
schumaku
Guru
Posts: 43578
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: [Help] MAC continually logs in via SAMBA as guest

Post by schumaku »

Tom9999 wrote:Consequence for me: I am now looking for a NAS device from another manufacturer. Sad for QNAP, sad for my bank account.
A strange decision as you are aware:

1. The original issue (it it is really one) is 100% sure caused by the OS X client for simplicity (thus you blocked the outgoing traffic to port 137 - correct?) detecting for services available on the network - and not by the NAS.

2. NFS requires very tight integration of client and server, e.g. having usernames, uid, groups, and gid (at least as used for NFS at least) in harmony. Otherwise, NFS is leading to strange issues, or dangerous settings. Then again, be aware when using SAMBA _and_ NFS: There is no perfect solution possible, because SAMBA is using the umask security bits to map Windows specific items.

To simplify NFS management, the implementation of yp all over the nfs systems should be considered - but I do not know how good yp is integrated on OS X.

This is the same all around...changing hardware does not help.

-Kurt.
TallPaul
Getting the hang of things
Posts: 74
Joined: Mon Feb 23, 2009 8:00 pm

Re: [Help] MAC continually logs in via SAMBA as guest

Post by TallPaul »

schumaku wrote:
Tom9999 wrote:Consequence for me: I am now looking for a NAS device from another manufacturer. Sad for QNAP, sad for my bank account.
A strange decision as you are aware:

1. The original issue (it it is really one) is 100% sure caused by the OS X client for simplicity (thus you blocked the outgoing traffic to port 137 - correct?) detecting for services available on the network - and not by the NAS.
To be fair, there is no reason for the QNAP to spin up the disks on a guest request for share information, surely this detail can be cached? Even with no public visibility of the shares enabled (i.e. no file is being accessed) the smbd process is still accessing the disks when a guests requests share information.

I have resorted to turning off windows sharing, until I need to print then I have to enable it again as there is no separate way to enable/disable the cups service independent of samba it seems?
TS 209-II with Version 3.1.0 build 0708T
User avatar
schumaku
Guru
Posts: 43578
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: [Help] MAC continually logs in via SAMBA as guest

Post by schumaku »

TallPaul wrote:To be fair, there is no reason for the QNAP to spin up the disks on a guest request for share information, surely this detail can be cached?
Certainly, for the guest connection attempt - but very likely the connection attempt must be logged - every now and then, the logs are written to the disk system (to a database in fact); very hard to achieve if the disks don't spin.

Concur - all that noise is not really about NFS and its administration nor about OS X and its continuous "hello world" attempts - it is in fact just about spin-down of the disks?

Being green is great - I'm maintaining systems with many HDDs up and spinning 24*366 for years. Not a single disk failed in 16 years. Can't say the same for disks which are not spinning as regular; e.g. backup devices - same age, same manufacturer...oh, yes - system uptime is > 1500 days since updating the operating system a while back.

The world is not perfect...compromises all around.

-Kurt.
TallPaul
Getting the hang of things
Posts: 74
Joined: Mon Feb 23, 2009 8:00 pm

Re: [Help] MAC continually logs in via SAMBA as guest

Post by TallPaul »

yes but if you have access logging disabled, it has nothing to log!
Your reasons are exactly my reasons, I don't want the disks spun up adding wear and tear every time I power on the laptop, only when I want to access data on it.

I don't really mind if a disk fails, its under warrenty and I have raid 1 (and backups) to protect the data. In the UK at least the cost of the power to spin the disks is far greater than the cost of a replacement disk over 3-5 years anyway!

They just need to sort out the 3.2 release for 209, I am sure it has a later samba version which may help, and if not at least we can do time machine backups...
TS 209-II with Version 3.1.0 build 0708T
titao
Starting out
Posts: 30
Joined: Sun Dec 28, 2008 2:22 am

Re: [Help] MAC continually logs in via SAMBA as guest

Post by titao »

hi,
i don't have logs enabled for samba and my disks still spin up. I know it's a MAC problem but why does my nas spin up if there's nothing to do in a failed guest attempt?
andrewm42
Starting out
Posts: 17
Joined: Wed Nov 18, 2009 6:18 pm

Re: [Help] MAC continually logs in via SAMBA as guest

Post by andrewm42 »

Finally - peace and quiet!

On my Qnap 419 I have changed the smb.conf settings - and low and behold, my mac no longer wants to connect automagically to the qnap without me telling it to! I do now need to type in the name (or ip address if no dns) when connecting to it - but believe me - thats worth it! :)

/etc/config/smb.conf

add

local master = no

to the top section of your configuration and restart smb.

? /etc/init.d/smb restart ?

Regards

Andrew
MoxFulder
Getting the hang of things
Posts: 67
Joined: Wed Jan 20, 2010 6:01 pm
Location: Switzerland

Re: [Help] MAC continually logs in via SAMBA as guest

Post by MoxFulder »

thanks for the tip !
TallPaul
Getting the hang of things
Posts: 74
Joined: Mon Feb 23, 2009 8:00 pm

Re: [Help] MAC continually logs in via SAMBA as guest

Post by TallPaul »

Does this file get overwritten on reboot?
TS 209-II with Version 3.1.0 build 0708T
andrewm42
Starting out
Posts: 17
Joined: Wed Nov 18, 2009 6:18 pm

Re: [Help] MAC continually logs in via SAMBA as guest

Post by andrewm42 »

Haven't tried to be honest.

You are more than welcome to try and see what happens! :)

I am more worried that it gets changed if you change any SMB options via the GUI. But as I don't play with or reboot the box very often, I would put it in again by hand if worst really did come to the worst.

Regards

Andrew
TallPaul
Getting the hang of things
Posts: 74
Joined: Mon Feb 23, 2009 8:00 pm

Re: [Help] MAC continually logs in via SAMBA as guest

Post by TallPaul »

From memory this is one of the files that gets overwritten, so you have to edit it somewhere else in the file structure so the Qnap uses the modified one on startup, I think...
TS 209-II with Version 3.1.0 build 0708T
titao
Starting out
Posts: 30
Joined: Sun Dec 28, 2008 2:22 am

Re: [Help] MAC continually logs in via SAMBA as guest

Post by titao »

Hi,

i've managed to solve this problem by stopping nmbd process which handles netbios requests.
i haven't tried this with the default installed samba version. i've upgraded samba to samba3 through ipkg, to be able to have just the shares that i want, and then edited the script which enables smbd and nmbd at startup to stop nmbd.

nmbd is only needed to search for samba servers, since we all know the ip of our nas, we can stop this process and smbd works normally.

i'm sure that it's possible to stop nmbd from the default installed samba, but i'm tired of all the tweakings i need to do just to stop one process from being run.

cheers
User avatar
schumaku
Guru
Posts: 43578
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: [Help] MAC continually logs in via SAMBA as guest

Post by schumaku »

Don't know if this can be considered a solution - at least on my Fedora 12 (3.4.5-55.fc12), I can still see the guest connection attempts. Potentially, these connection attempts are simply no longer logged on the QNAP.

Will the disks spin-down with this configuration then?

Tend to say this is not the world's best suggestion for the typical Apple OS X users here.

-Kurt.
andrewm42
Starting out
Posts: 17
Joined: Wed Nov 18, 2009 6:18 pm

Re: [Help] MAC continually logs in via SAMBA as guest

Post by andrewm42 »

Hi Kurt,

I am running Mac OS X 10.6.x, and thankfully it works and the NAS sleeps the disks. It will probably not work if you have another SAMBA/ Windows server/ WINS server on the network, as this will once again announce the fact that there is a server available.

The reason that this works at all, is that the Mac doesn't realise that the NAS is there - until you connect to it manually. You need to restart Samba though, after making the change :)...

Good luck

Andrew
benomg
New here
Posts: 3
Joined: Tue Feb 09, 2010 1:37 pm

Re: [Help] MAC continually logs in via SAMBA as guest

Post by benomg »

hi titao,

I like the idea of updating samba, are there anythings that we should look out for or is it a smooth process?
User avatar
schumaku
Guru
Posts: 43578
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: [Help] MAC continually logs in via SAMBA as guest

Post by schumaku »

It neither is a smooth process, nor supported in any way. You will be on your own.

All what is done is suppressing the start of a SAMBA standard function, so the NAS does no longer properly announce itself as a Windows File Server anymore. In addition, when you are carefully reading the previous posts, manual actions are required to make the NAS announcing itself on the net to again.

Not the only issue where OS X users should check with Apple to remove or allow a more granular control over some questionable behavior, instead of doing ugly things on the NAS side.

-Kurt.
Post Reply

Return to “Mac OS”