Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Enable the SWAT Samba config tool in 10.4' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Enable the SWAT Samba config tool in 10.4
Authored by: gxw on May 02, '05 10:00:36PM

Got SWAT to work in 10.4.
1. Go to /System/Library/LaunchDaemons
2. Edit swat.plist
3. In the line directly under /usr/sbin/swat change the -d 10 to -a
4. Save the file.
5. Edit /etc/hostconfig
7. Save
8. Edit /etc/services
9. Find the line where port 901 is defined
10. delete the line where it says 901/udp
11. Change the 901/tcp line to read:
swat 901/tcp
12. Save the file
13. run /sbin/service swat start
14. reboot
15. goto http://localhost:901

-a tells swat to not ask for a password - BE Careful when turning this on! I will not be responsible for your use of this. Using this means that anyone using your Mac will be able to edit your smb.conf file! Note you won't be able to access swat from another machine.

I think the swat program does not know how to read netinfo for the password which is why the root account & password were always rejected. I need to RTFM on this. Having a hard time finding the FM though.

I don't know where apple got the -d 10 parm from. This switch is not in the swat manual.

Forgot to test to see if I can actually change any values when I use swat. But I can now access the smb.conf documentation easier.

Like I said above, I need to do more research on this.

[ Reply to This | # ]
Enable the SWAT Samba config tool in 10.4
Authored by: StormeRider on Sep 29, '05 11:21:31AM
-d 10 is to turn on debug level 10. An alternate way to start is to use launchctl:
$ sudo launchctl load -w /System/Library/LaunchDaemons/swat.plist
$ sudo launchctl list | grep -i swat
Still trying to track down the right way to authenticate... /var/log/samba/log.swat has this error:
[2005/09/29 18:10:29, 4] /SourceCache/samba/samba-92.9/samba/source/auth/pass_check.c:pass_check(621)
  pass_check: Checking (PAM) password for user root (l=8)
[2005/09/29 18:10:29, 4] /SourceCache/samba/samba-92.9/samba/source/auth/pampass.c:smb_pam_start(463)
  smb_pam_start: PAM: Init user: root
[2005/09/29 18:10:29, 4] /SourceCache/samba/samba-92.9/samba/source/auth/pampass.c:smb_pam_start(480)
  smb_pam_start: PAM: setting rhost to:
[2005/09/29 18:10:29, 4] /SourceCache/samba/samba-92.9/samba/source/auth/pampass.c:smb_pam_start(489)
  smb_pam_start: PAM: setting tty
[2005/09/29 18:10:29, 4] /SourceCache/samba/samba-92.9/samba/source/auth/pampass.c:smb_pam_start(497)
  smb_pam_start: PAM: Init passed for user: root
[2005/09/29 18:10:29, 4] /SourceCache/samba/samba-92.9/samba/source/auth/pampass.c:smb_pam_auth(514)
  smb_pam_auth: PAM: Authenticate User: root
[2005/09/29 18:10:29, 2] /SourceCache/samba/samba-92.9/samba/source/auth/pampass.c:smb_pam_auth(518)
  smb_pam_auth: PAM: Athentication Error for user root
[2005/09/29 18:10:29, 2] /SourceCache/samba/samba-92.9/samba/source/auth/pampass.c:smb_pam_error_handler(77)
  smb_pam_error_handler: PAM: Authentication Failure : Authentication failure
[2005/09/29 18:10:29, 0] /SourceCache/samba/samba-92.9/samba/source/auth/pampass.c:smb_pam_passcheck(814)
  smb_pam_passcheck: PAM: smb_pam_auth failed - Rejecting User root !
[2005/09/29 18:10:29, 4] /SourceCache/samba/samba-92.9/samba/source/auth/pampass.c:smb_pam_end(444)
  smb_pam_end: PAM: PAM_END OK.

[ Reply to This | # ]
Enable the SWAT Samba config tool in 10.4
Authored by: ikirudennis on Jan 24, '06 02:09:39PM

I just stumbled upon this fix recently, and although it seems to get me quite a bit closer to actually configuring samba, it falls just short. Has anyone figured out anything further regarding configuring samba, swat or smbd user accounts?

[ Reply to This | # ]
Enable the SWAT Samba config tool in 10.4
Authored by: growler on Dec 26, '06 12:24:40AM
I figured out a way to get SWAT to authenticate properly. As noted above, the logs indicate it is a pam authentication problem. I do NOT know anything about how pam works, so if this solution doesn't work for you... well, I can't help you.

Basically, I completely followed gxw's hint above, however I decided to leave the smb server switch set to "-d 10" per the default. (I did not use the "-a" option, which nullifies the need to authenticate at all....) Much googling suggested that pam was looking for a samba authentication file, so using the terminal I cd'd to "/etc/pam.d" and sure enough, there was no file named "samba"... so I simply entered this command:

sudo cp ./passwd ./samba

I rebooted, and when the machine came up, I was able to use Safari to navigate to http://localhost:901/ and successfully logon to the SWAT configuration tool.

Hope this helps some folks!

PS: I am running OS X 10.4.8 on a PPC Mac Mini, with the latest patches and updates applied. The version of SWAT installed is 3.0.10. Also, I didn't have to mess around with NetInfo Manager: the root account had already been activated on my machine.

[ Reply to This | # ]

Enable the SWAT Samba config tool in 10.4
Authored by: Scooper on Jun 01, '07 10:35:49PM

This worked, I have no idea why I needed to do it but now I can get into swat. Thanks very much.

[ Reply to This | # ]