SMB authentication issue

SMB seems to be working OK on my server, but recently we changed the FQDN of the server, and when I had to go help everyone switch their setups, I noticed some strange issues. They may or may not have been related to the change. Basically, one user could not log in at all. Then, at some point, he began to be able to log in without any authentication, and could access things he shouldn't have had permission to access. I noticed lots of these messages in system.log:

---
Mar 4 10:38:02 internal org.samba.smbd[39411]: The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Mar 4 10:38:02 internal org.samba.smbd[39411]: Break on _THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___Y OU_MUST_EXEC_() to debug.
---

The SMB logs don't seem to exist... I had this issue with the iCal logs not being generated, and had to manually create the folder for them in /var/logs. I don't know what the folder name should be for the SMB logs, but I'll look that up now and try creating it.

Greg

Mac Pro, Power Mac G4 (Gigabit Ethernet), Mac OS X (10.5.2)

Posted on Mar 4, 2008 7:53 AM

Reply
9 replies

Mar 4, 2008 8:03 AM in response to Greg Westin

I created /var/log/samba and now SMB logging seems to be working. I'm not sure if this is a concern:

---
Mar 4 10:48:23 internal /usr/sbin/ocspd[39539]: starting
Mar 4 10:59:41 internal sudo[39603]: westin : TTY=ttys000 ; PWD=/private/var/log ; USER=root ; COMMAND=/usr/bin/su
Mar 4 11:00:15 internal servermgrd[80]: --Module servermgr_smb returned nil response
Mar 4 11:00:17 internal servermgrd[80]: servermgr_smb: -[SCSMBConfigurationParser writeFile] kSMBPreferencesSyncTool
Mar 4 11:00:18 internal com.apple.launchd[1] (org.samba.smbd[39411]): Stray process with PGID equal to this dead job: PID 39418 PPID 1 smbd
Mar 4 11:00:22 internal servermgrd[80]: servermgr_smb: -[SCSMBConfigurationParser writeFile] kSMBPreferencesSyncTool
---

I'll go test the authentication issue again, now that I can see the logs when users connect.

Greg

Mar 19, 2008 2:10 PM in response to Greg Westin

The 'process has forked' error messages persist, and users can still connect without passwords. Interestingly, they seem to connect as the correct user, so it's as if the previous connection isn't being terminated properly, or Windows is saving the login information. Perhaps the 'process has forked' messages are indicating that there's some problem with actually getting rid of processes?

If I shut down the SMB service, disconnect all clients, then restart the service and connect a client, this happens:

---
\[2008/03/19 17:05:51, 0\] /SourceCache/samba/samba-187/samba/source/smbd/server.c:main(890)
smbd version 3.0.25b-apple started.
Copyright Andrew Tridgell and the Samba Team 1992-2007
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on _THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___Y OU_MUST_EXEC_() to debug.
---

I don't know if this is relevant, but I saw another post that said that I had to make my SMB server the PDC, and I get a number of messages like this in the SMB Name Service Log:

---
Samba name server SERVERNAME is now a local master browser for workgroup WORKGROUPNAME on subnet xxx.xxx.xxx.xx
---

Thanks for any help,

Greg

Message was edited by: Greg Westin to add a few more details about error messages

Mar 19, 2008 3:29 PM in response to Greg Westin

I just tried connecting using SMB from a 10.5 Mac, and this seems to work fine. At this point, I think that:

- I had some problems with my permissions setup that applied an ACL permitting all users in our group to read/write to basically everything, which caused it to seem like an unauthenticated user could somehow read/write everywhere
- Users by default seem to connect as a guest; however, if I try to mount a user's home folder (no matter which one) it prompts for authentication, which always seems to fail.
- At least some of the users who had working connections before still connect, without authentication, under their own usernames.

So one issue might be with my authentication setup; perhaps I need to change to use a different authentication method. This might solve the issue of users being unable to truly de-authenticate by disconnecting the network drive, and perhaps also the setup that doesn't automatically ask for authentication, but instead logs people in as guest by default.

Thanks for any help on this,

Greg

Mar 24, 2008 11:18 AM in response to Greg Westin

I've disabled guest access and changed some settings for the SMB service, and now I'm down to two issues:

- The issue I mentioned before of users basically being unable to de-authenticate. If I change the user's password on the server, the person has to log in again, but if I change the password back, the user once again cannot log out. Even logging out and restarting don't change this. How can I remove this saved authentication information?

- The second issue is that I have at least one computer that couldn't connect via domain name, but could connect via IP address. It said that it couldn't locate the resource, or something like that, when connecting by domain name. After connecting via IP, however, I could connect via domain name just fine. All of my client machines are on a different subnet from the server, and that computer could seemingly connect via other protocols (like on ports 8443 and 8008 for the iCal server) using the domain name.

This is exhausting. I wish I could just not support these Windows clients.

Greg

Mar 24, 2008 11:43 AM in response to Greg Westin

Have you enabled WINS service (under SMB, or Windows)? If so, Samba gathers information about workstation names and their associated IP addresses. If you change the IP address, it does not necessarily mean that the information within the WINS database is updated any time soon. This effectively means that when a workstation queries (sends a broadcast message) for the IP address of the domain controller, it will probably get back outdated information from the server thus trying to contact the wrong IP address.

I suggest you delete the WINS database file /var/samba/wins.dat after you have stopped SMB. Or maybe it is safer to rename it to wins.dat.bak. Then start SMB again. You can monitor as the wins.dat file will be created and will start to grow in size while workstations announce their presence on the network. It will take about 10 minutes or so before most of them have their information listed. You can "cat" the file to see if the relevant workstations are present before you try to log in from them.

Hope this helps a bit.

Andrus

Mar 24, 2008 1:39 PM in response to andrussuitsu

Honestly, I don't really understand the purpose of WINS. I had it off, but turned it on today after seeing someone suggest that on some discussion here. If none of my client machines are on the same subnet as the server, how do they 'announce their presence'? Looking at that file, I see a number of entries that correspond to the server's IP, and a number that list 255.255.255.255. This makes me think that WINS must not be appropriate for this situation.

The client workstations are all behind a firewall that doesn't allow any incoming connections (they don't have externally-accessible IP addresses).

Greg

Mar 24, 2008 11:48 PM in response to Greg Westin

The purpose of WINS is very simple - it maps the NetBIOS computer and domain names to IP addresses. Workstations announce their presence by broadcasting information about their name and capabilities (server, workstation, sql server, etc) on their subnet. When a Windows computer logs into a domain, it will first query "who is the domain controller for the domain X?" using a broadcast again.

If your computers are on different subnets and the broadcasts are not "heard", then I believe it is not possible for them to contact the domain controller at all.

Mar 26, 2008 10:39 AM in response to Greg Westin

A Wins Server is requried to get a decent windows setup, especially if there's more than one windows server in the area. If you set your server to be the PDC then I would also set it to be the WINS server. I would also set each windows machine to know what that wins server is, otherwise you are relying windows to figure it out for it's self. To do this on each work station do the following:

Go to control panel, Network connections.
Right click on the ethernet connect in use and select properties.
Click on 'Internet Protocol (TCP/IP)' in the list and hit the properties button.
Now click on the Advanced button.
Click on the WINS tab.
Hit the add button and enter the IP address of the WINS server (you just created) and hit add.
Click OK to close the three dialog boxes.

You will then have to restart the windows machine before it will work correctly.
HTH
Ian

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

SMB authentication issue

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.