Re: Samba question
On Sat, 10 Sep 2011 11:53:48 +0100, Graeme Dargie wrote: I am trying to mount a samba share that is on a FreeBSD 8.2 server to another FreeBSD 8.2 server, Mount_smbfs -I IP //user@host/share /mountpoint It then asks for a password, I enter the users password and then get mount_smbfs: unable to open connection: syserr = Authentication error Dmesg is showing smb_co_lock: recursive lock for object 1 I have samba integrated with Active Directory, so I then thought ah maybe adding the user to AD would help, so I have done so using the same password etc still no joy, I have make sure the user has access rights on the samba share, restarted samba and the same error persists, any ideas ? Sorry, my indivudal knowledge on Windows related things is very limited, but maybe you need to add some information into /etc/nsmb.conf? Maybe like this: [default] workgroup=YOUR_WORKGROUP_NAME [SERVERNAME] addr=192.168.2.2 [SERVERNAME:USERNAME] password=TOPSECRET where SERVERNAME and USERNAME correspond to the server's name and the username you use to access the share (with the proper password). See man nsmb.conf for details. Parts of those information should then be reflected in /etc/fstab, maybe like this: //user@SERVERNAME/share /smb/share smbfs rw,noauto 0 0 This should allow you to use # mount /smb/share a bit easier (and automatically, if desired). -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Samba question
Polytropon wrote: On Sat, 10 Sep 2011 11:53:48 +0100, Graeme Dargie wrote: I am trying to mount a samba share that is on a FreeBSD 8.2 server to another FreeBSD 8.2 server, Mount_smbfs -I IP //user@host/share /mountpoint It then asks for a password, I enter the users password and then get mount_smbfs: unable to open connection: syserr = Authentication error Dmesg is showing smb_co_lock: recursive lock for object 1 I have samba integrated with Active Directory, so I then thought ah maybe adding the user to AD would help, so I have done so using the same password etc still no joy, I have make sure the user has access rights on the samba share, restarted samba and the same error persists, any ideas ? Sorry, my indivudal knowledge on Windows related things is very limited, but maybe you need to add some information into /etc/nsmb.conf? Maybe like this: [default] workgroup=YOUR_WORKGROUP_NAME [SERVERNAME] addr=192.168.2.2 [SERVERNAME:USERNAME] password=TOPSECRET where SERVERNAME and USERNAME correspond to the server's name and the username you use to access the share (with the proper password). See man nsmb.conf for details. Parts of those information should then be reflected in /etc/fstab, maybe like this: //user@SERVERNAME/share /smb/share smbfs rw,noauto 0 0 This should allow you to use # mount /smb/share a bit easier (and automatically, if desired). Although it has been ages since I played with this, one thing I do recall: It matters that where indicated above the characters _must_ be in upper case. When I used to use such a setup I found it wouldn't work without it. Never knew exactly quite why. -Mike ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: samba question
spen wrote: smbd Abort trap nmbd The story is that the first time I installed samba I enabled it in my /etc/rc.conf writting echo smbd /usr/local/sbin/smbd -D echo nmbd /usr/local/sbin/nmbd -D This is incorrect way to start daemons. You need read manual page for rc.conf. What is last mail with abort trap you got? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: samba question
I have already changed the way to enable samba on the machine. I do not use this in rc.conf echo smbd /usr/local/sbin/smbd -D echo nmbd /usr/local/sbin/nmbd -D but simply: #enable samba samba_enable=YES the last message was the one I posted. Fortunatelly I haven't got any mail since then, so I guess things are OK. Do you think the whole problem was on those two lines above that I used to have in my rc.conf? i'll include the last mail I got for abort trap: Message 1: From [EMAIL PROTECTED] Fri Oct 21 13:22:01 2005 Date: Fri, 21 Oct 2005 13:22:00 +0300 (EEST) From: [EMAIL PROTECTED] (Cron Daemon) To: [EMAIL PROTECTED] Subject: Cron [EMAIL PROTECTED] /usr/libexec/save-entropy X-Cron-Env: SHELL=/bin/sh X-Cron-Env: PATH=.:/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin X-Cron-Env: HOME=/ X-Cron-Env: LOGNAME=operator X-Cron-Env: USER=operator smbd Abort trap nmbd Could you also enlight me in what Abort trap means? thank you Spen __ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: samba question
If I remember correctly, you have to start inetd to run smbd and nmbd. Check FreeBSD handbook for further details about configuring samba. Regards, OJ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: samba question
At 02:36 AM 10/24/2005, Owen Jeremiah wrote: If I remember correctly, you have to start inetd to run smbd and nmbd. Check FreeBSD handbook for further details about configuring samba. Samba doesn't care about inetd. Adding samba_enable=YES to rc.conf is sufficient. (assuming you built samba from ports) -Glenn Regards, OJ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: samba question
Owen Jeremiah wrote: If I remember correctly, you have to start inetd to run smbd and nmbd. Check FreeBSD handbook for further details about configuring samba. You _dont need_ inetd for Samba, moreover, inetd will degrade Samba performance, and AFAIK is not recommeded by Samba team . ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: samba question
My mistake. I was referring to SWAT instead of smbd and nmbd. Regards, OJ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Samba Question
Darryl Hoar wrote: I have Samba installed on a Freebsd 5.1 server. I am trying to map a share from a windows machine so that I can copy the data. I can not change the windows share name. It has a space in it. How do I specify the share name in fstab. share name: PSR COMPLETE //[EMAIL PROTECTED]/PSR COMPLETE /psrcomplete smbfs ro,noauto 0 0 doesn't work. Can't use quote marks Hi, I once had the same problem, and I came up with the following patch: http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/55539 (I have attached version of the patch that applies to FreeBSD 5.2.1, otherwise please use the very last version of it (at the bottom of the problem report page). The following instructions assume that you have the system sources in /usr/src # cd /usr/src # patch /path/to/fstab-vis.patch Now either do a full buildworld cycle, or use the following commands (untested): # cd /usr/src/lib/libc # make depend make make install clean # cd /usr/src/share/man/man5 # make depend make make install clean Now you can encode the spaces with the vis(1) utility: vis -w your mount point goes hereENTER See also the updated fstab(5) man page. If you try this patch, please tell me, whether it works for you, perhaps someday I can get it committed. Regards, Simon --- lib/libc/gen/fstab.c.orig Mon Apr 7 14:55:00 2003 +++ lib/libc/gen/fstab.cSun Apr 4 21:45:30 2004 @@ -49,6 +49,7 @@ #include stdlib.h #include string.h #include unistd.h +#include vis.h #include un-namespace.h static FILE *_fs_fp; @@ -110,6 +111,41 @@ _fs_fstab.fs_spec = buf; } +/* + * Converts a string *str, that possibly contains vis(1|3) encoded + * characters (visual representation) into the original form. + * See also: unvis(1|3) + * + * Return values: 0 on success, 1 otherwise + */ +int unescape (char *str) { + int state = 0; + char out, *s = str, *t = str; + + if (str == NULL) + return 1; + + while (*s != '\0') { + again: + switch(unvis(out, *s, state, 0)) { + case 0: + case UNVIS_NOCHAR: + break; + case UNVIS_VALID: + *t++ = out; + break; + case UNVIS_VALIDPUSH: + *t++ = out; + goto again; + case UNVIS_SYNBAD: + return 1; + } + ++s; + } + *t = '\0'; + return 0; +} + static int fstabscan() { @@ -128,9 +164,19 @@ if (*line == '#' || *line == '\n') continue; if (!strpbrk(p, \t)) { - _fs_fstab.fs_spec = strsep(p, :\n); - _fs_fstab.fs_file = strsep(p, :\n); + cp = strsep(p, :\n); + if (!unescape (cp)) + _fs_fstab.fs_spec = cp; + else + goto bad; + + cp = strsep(p, :\n); + if (!unescape (cp)) + _fs_fstab.fs_file = cp; + else + goto bad; fixfsfile(); + _fs_fstab.fs_type = strsep(p, :\n); if (_fs_fstab.fs_type) { if (!strcmp(_fs_fstab.fs_type, FSTAB_XX)) @@ -152,13 +198,21 @@ /* OLD_STYLE_FSTAB */ while ((cp = strsep(p, \t\n)) != NULL *cp == '\0') ; - _fs_fstab.fs_spec = cp; + if (!unescape (cp)) + _fs_fstab.fs_spec = cp; + else + goto bad; if (!_fs_fstab.fs_spec || *_fs_fstab.fs_spec == '#') continue; + while ((cp = strsep(p, \t\n)) != NULL *cp == '\0') ; - _fs_fstab.fs_file = cp; + if (!unescape (cp)) + _fs_fstab.fs_file = cp; + else + goto bad; fixfsfile(); + while ((cp = strsep(p, \t\n)) != NULL *cp == '\0') ; _fs_fstab.fs_vfstype = cp; --- share/man/man5/fstab.5.orig Thu Dec 12 18:25:57 2002 +++ share/man/man5/fstab.5 Sun Apr 4 21:46:35 2004 @@ -10,7 +10,7 @@ .\notice, this list of conditions and the following disclaimer in the .\documentation and/or other materials provided with the distribution. .\ 3. All advertising materials mentioning features or use of this software -.\must display the following acknowledgement: +.\must display the following acknowledgment: .\This product includes software developed by the University of .\California, Berkeley and its contributors. .\
Re: Samba question
On Sun, Nov 16, 2003 at 09:08:12PM -0500, Marty Landman wrote: No. Now I did rebooted. Same symptom, i.e. windoz explorer tells me \\Swamisalami is not accessible. ... The account is not authorized to log in from this station. Martin, following line in your smb.conf should solve this problem: encrypt passwords = yes This is because newer Windows releases refuse to send unencrypted passwords by default. You could tweak Windows to enable unencrypted passwords, but I prefer enabling encrypted passwords in samba instead. Have a look at /usr/local/share/doc/samba/htmldocs/ENCRYPTION.html for more details. Hope this helps. Kind regards, Ilya Varlashkin ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Samba question
At 08:47 AM 11/22/2003, Ilya Varlashkin wrote: Martin, following line in your smb.conf should solve this problem: encrypt passwords = yes Ilya, I almost forgot to reply... sorry. I may not have mentioned on earlier postings that smbd was not running as I eventually discovered - only nmbd. I think my installation became a mess and since I'm able to do what I need for now using ssh and ftp from my workstation am content to leave it at that for the time being. Thanks. Marty Landman Face 2 Interface Inc 845-679-9387 Sign On Required: Web membership software for your site Make a Website: http://face2interface.com/Home/Demo.shtml ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Samba question
+++ Marty Landman [15-11-03 23:12 -0500]: | At 09:46 PM 11/15/2003, Robin Schoonover wrote: | | Hmm. Ignoring everything else you gave us, I'd say it sounds like there is | a firewall in the way. I've had the exact same problem before. | | I believe I have ipfw disabled.. | | # ps -ax|grep ipfw | # what's the o/p of # ipfw s ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Samba question
At 02:00 PM 11/16/2003, Shantanoo Mahajan wrote: what's the o/p of # ipfw s ipfw: getsockopt(IP_FW_GET): Protocol not available Like I said though, I think this config is a total mess now. At some point I'll work out how to undo what I've (wrongly) done and then start over. Marty Landman Face 2 Interface Inc 845-679-9387 Sign On Required: Web membership software for your site Make a Website: http://face2interface.com/Home/Demo.shtml ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Samba question
On Sat, 15 Nov 2003, Marty Landman wrote: Ok, I think this is a mess now. First I tried the toot in the FBSD Diary, and now the chapter 2 toot from O'Reilly. My Samba install is likely way out of rhythm! Still it's so close - I can see the share on windoz explorer but can't access it that maybe others here can help. Here's most of what's in my /usr/local/etc/smb.conf (the test path, i.e. my share is chmod 777) You don't say what the error is, but does the parent directory of the share have browseable rights (+x) for the Samba user? -Warren Block * Rapid City, South Dakota USA ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
RE: Samba question
Ok, I think this is a mess now. First I tried the toot in the FBSD Diary, and now the chapter 2 toot from O'Reilly. My Samba install is likely way out of rhythm! Still it's so close - I can see the share on windoz explorer but can't access it that maybe others here can help. Here's most of what's in my /usr/local/etc/smb.conf (the test path, i.e. my share is chmod 777) [global] workgroup = Face2Interface server string = Samba Server hosts allow = 192.168.0. 127. [test] comment = For testing only, please path = /usr/local/www/data read only = yes guest ok = yes CUPS is mentioned in the logs, and you don't seem to know what it is, so do you have a line similar to: printing = cups in smb.conf? If you don't need cups, don't list it in smb.conf. I have seen cases where a cups/smb mismatch killed samba. If you do need cups, make sure it accepts connections from localhost (should be default case). Also, did you define guest in smb.conf and did you create the acct with smbpasswd -a ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
RE: Samba question
At 02:23 PM 11/16/2003, Derrick Ryalls wrote: CUPS is mentioned in the logs, and you don't seem to know what it is, so do you have a line similar to: printing = cups No, good point. I have ;printing = bsd so that was commented out. Also, did you define guest in smb.conf and did you create the acct with smbpasswd -a No. Now I did rebooted. Same symptom, i.e. windoz explorer tells me \\Swamisalami is not accessible. ... The account is not authorized to log in from this station. One thing I notice is that nmbd is running but smbd isn't (ps -ax|grep mbd). Is this normal behavior? more /var/log/dmesg.today|grep mbd yields nothing; looking at /var/log/log.nmbd the line Packet send failed to 192.168.0.255(137) ERRNO=No route to host sticks out like a sore thumb. I gather that lil' devil tried probing port 137 on lan ip 192.168.0.255. That node doesn't exist; my dns comes from a win xp box called delliver with ip 192.168.0.1 and dial up using win ics. Yet for some reason samba looked at a non-existent ip on the lan; also it reported no route to host. Finally when I do a find computer on win xp for swamisalami it find two. One's just that, the other is that parenthetically labelled Samba Server. Neither is accessible. Finally when I look for my fbsd box by ip adr on win find computer it now finds it - also not accessible. Looks like I did something right and something wrong. (stating the painfully obvious). Marty Landman Face 2 Interface Inc 845-679-9387 Sign On Required: Web membership software for your site Make a Website: http://face2interface.com/Home/Demo.shtml ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Samba question
On Sun, 16 Nov 2003 21:08:12 -0500 Marty Landman [EMAIL PROTECTED] granted us these pearls of wisdom: At 02:23 PM 11/16/2003, Derrick Ryalls wrote: CUPS is mentioned in the logs, and you don't seem to know what it is, so do you have a line similar to: printing = cups No, good point. I have ;printing = bsd so that was commented out. Also, did you define guest in smb.conf and did you create the acct with smbpasswd -a No. Now I did rebooted. Same symptom, i.e. windoz explorer tells me \\Swamisalami is not accessible. ... The account is not authorized to log in from this station. One thing I notice is that nmbd is running but smbd isn't (ps -ax|grep mbd). Is this normal behavior? more /var/log/dmesg.today|grep mbd yields nothing; looking at /var/log/log.nmbd the line Packet send failed to 192.168.0.255(137) ERRNO=No route to host sticks out like a sore thumb. I gather that lil' devil tried probing port 137 on lan ip 192.168.0.255. That node doesn't exist; my dns comes from a win xp box called delliver with ip 192.168.0.1 and dial up using win ics. Yet for some reason samba looked at a non-existent ip on the lan; also it reported no route to host. Finally when I do a find computer on win xp for swamisalami it find two. One's just that, the other is that parenthetically labelled Samba Server. Neither is accessible. Finally when I look for my fbsd box by ip adr on win find computer it now finds it - also not accessible. Looks like I did something right and something wrong. (stating the painfully obvious). Let me ask a couple of really silly questions. Did you actually set up a user account ? Is there a line in your smb.conf that refers to listening interfaces and are they the correct interfaces/addresses ? One thing I notice is that nmbd is running but smbd isn't (ps -ax|grep mbd). Is this normal behavior? more /var/log/dmesg.today|grep mbd yields nothing; looking at /var/log/log.nmbd the line most definately not normal behaviour. smbd should be spawing a process as root ie the master process and then one process per user so if you cannot see smbd running then I cannot see how you can hope to connect sucessfully. nmbd is the netbios name daemon so if that is running you should be able to see the computer but without smbd you cannot connect. HTH LukeK ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Samba question
On Sat, 15 Nov 2003 21:37:32 -0500, Marty Landman [EMAIL PROTECTED] wrote: Ok, I think this is a mess now. First I tried the toot in the FBSD Diary, and now the chapter 2 toot from O'Reilly. My Samba install is likely way out of rhythm! Still it's so close - I can see the share on windoz explorer but can't access it that maybe others here can help. Hmm. Ignoring everything else you gave us, I'd say it sounds like there is a firewall in the way. I've had the exact same problem before. BTW dudes, what's a CUPS server? 8^} CUPS is the Common UNIX Printing System. -- Robin Schoonover (aka End) # # We're not surrounded, we're in a target-rich environment! # ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Samba question
At 09:46 PM 11/15/2003, Robin Schoonover wrote: Hmm. Ignoring everything else you gave us, I'd say it sounds like there is a firewall in the way. I've had the exact same problem before. I believe I have ipfw disabled.. # ps -ax|grep ipfw # I start it up by doing # /usr/local/sbin/smbd -D ; /usr/local/sbin/nmbd -D and then only find nmbd running.. is that normal behavior? Also even after killing nmbd it comes back seemingly on its own. Sorry if I'm rambling on but I seem to be lost. Maybe I should instead try to copy the cups and samba execs in rc.d from their defaults and do a shutdown. Anyway... Marty Landman Face 2 Interface Inc 845-679-9387 Sign On Required: Web membership software for your site Make a Website: http://face2interface.com/Home/Demo.shtml ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]