Re: [lorenl@alzatex.com: Re: Mounting a samba share on boot?]
On Tue, Feb 01, 2005 at 05:09:54PM +, Mark Ovens wrote: > Ruben de Groot wrote: > >On Mon, Jan 31, 2005 at 05:47:53AM -0800, Loren M. Lang typed: > >>On Mon, Jan 31, 2005 at 12:38:53PM +, Mark Ovens wrote: > >>> Loren M. Lang wrote: > >>> >replacing MYWORKGROUP, SERVER, USER, secret as neccessary. Make sure > >>> >nsmb.conf is only readable by root. Add the following line to fstab: > >>> > > >>> >//[EMAIL PROTECTED]/share /mnt/share smbfs rw 0 > >>> > > >>0 > >>> > > >>> > >>> PMJI, but do you know if it's possible to handle a share name > >>containing > a space when mounting smb filesystems using fstab? > >>> > >>> I tried > >>> > >>> "//[EMAIL PROTECTED]/Drive C" > >>> '//[EMAIL PROTECTED]/Drive C' > >>> //[EMAIL PROTECTED]/Drive\ C > >>> > >>> None of these worked. I know that using spaces in filenames is a Bad > >>> Idea, but this is Windows we're talking about here ;-) > >> > >>A random guess might be to try: //[EMAIL PROTECTED]/Driver%20C > >>%20 refers to the ascii character with hex value 20 which is space. > >>It's what webservers use for getting around spaces, samba might too.` > >>I'd be really curious to see if this works. > > > >The following seems to work for me: > > > >[EMAIL PROTECTED]:/root> mount_smbfs //odo/"Temp Dir" /mnt > >Password: > >[EMAIL PROTECTED]:/root> mount | grep smbfs > >//[EMAIL PROTECTED]/TEMP DIR on /mnt (smbfs) > >[EMAIL PROTECTED]:/root> > > > > Yes, that WFM too. The problem is if you try to add that as an entry in > /etc/fstab as it cannot handle the space. I had a quick look in fstab.c > and there appears to be no handling of escaped characters, which is > understandable I suppose since the first field would normally be > something /dev/da0s1a Well, the routines that read fstab may not handle escaped characters, but there may be some replacement for space that mount_smbfs accepts. Maybe you should check that program for some support for inserting spaces. > > Mark > > > > --- > avast! Antivirus: Outbound message clean. > Virus Database (VPS): 0505-0, 31/01/2005 > Tested on: 02/02/2005 01:30:28 > avast! - copyright (c) 2000-2004 ALWIL Software. > http://www.avast.com > > -- I sense much NT in you. NT leads to Bluescreen. Bluescreen leads to downtime. Downtime leads to suffering. NT is the path to the darkside. Powerful Unix is. Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc Fingerprint: B3B9 D669 69C9 09EC 1BCD 835A FAF3 7A46 E4A3 280C ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: [lorenl@alzatex.com: Re: Mounting a samba share on boot?]
Ruben de Groot wrote: On Mon, Jan 31, 2005 at 05:47:53AM -0800, Loren M. Lang typed: On Mon, Jan 31, 2005 at 12:38:53PM +, Mark Ovens wrote: > Loren M. Lang wrote: > >replacing MYWORKGROUP, SERVER, USER, secret as neccessary. Make sure > >nsmb.conf is only readable by root. Add the following line to fstab: > > > >//[EMAIL PROTECTED]/share /mnt/share smbfs rw 0 0 > > > > PMJI, but do you know if it's possible to handle a share name containing > a space when mounting smb filesystems using fstab? > > I tried > > "//[EMAIL PROTECTED]/Drive C" > '//[EMAIL PROTECTED]/Drive C' > //[EMAIL PROTECTED]/Drive\ C > > None of these worked. I know that using spaces in filenames is a Bad > Idea, but this is Windows we're talking about here ;-) A random guess might be to try: //[EMAIL PROTECTED]/Driver%20C %20 refers to the ascii character with hex value 20 which is space. It's what webservers use for getting around spaces, samba might too.` I'd be really curious to see if this works. The following seems to work for me: [EMAIL PROTECTED]:/root> mount_smbfs //odo/"Temp Dir" /mnt Password: [EMAIL PROTECTED]:/root> mount | grep smbfs //[EMAIL PROTECTED]/TEMP DIR on /mnt (smbfs) [EMAIL PROTECTED]:/root> Yes, that WFM too. The problem is if you try to add that as an entry in /etc/fstab as it cannot handle the space. I had a quick look in fstab.c and there appears to be no handling of escaped characters, which is understandable I suppose since the first field would normally be something /dev/da0s1a Mark --- avast! Antivirus: Outbound message clean. Virus Database (VPS): 0505-0, 31/01/2005 Tested on: 02/02/2005 01:30:28 avast! - copyright (c) 2000-2004 ALWIL Software. http://www.avast.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: [lorenl@alzatex.com: Re: Mounting a samba share on boot?]
On Mon, Jan 31, 2005 at 05:47:53AM -0800, Loren M. Lang typed: > On Mon, Jan 31, 2005 at 12:38:53PM +, Mark Ovens wrote: > > Loren M. Lang wrote: > > >replacing MYWORKGROUP, SERVER, USER, secret as neccessary. Make sure > > >nsmb.conf is only readable by root. Add the following line to fstab: > > > > > >//[EMAIL PROTECTED]/share /mnt/share smbfs rw 0 > > > 0 > > > > > > > PMJI, but do you know if it's possible to handle a share name containing > > a space when mounting smb filesystems using fstab? > > > > I tried > > > > "//[EMAIL PROTECTED]/Drive C" > > '//[EMAIL PROTECTED]/Drive C' > > //[EMAIL PROTECTED]/Drive\ C > > > > None of these worked. I know that using spaces in filenames is a Bad > > Idea, but this is Windows we're talking about here ;-) > > A random guess might be to try: //[EMAIL PROTECTED]/Driver%20C > %20 refers to the ascii character with hex value 20 which is space. > It's what webservers use for getting around spaces, samba might too.` > I'd be really curious to see if this works. The following seems to work for me: [EMAIL PROTECTED]:/root> mount_smbfs //odo/"Temp Dir" /mnt Password: [EMAIL PROTECTED]:/root> mount | grep smbfs //[EMAIL PROTECTED]/TEMP DIR on /mnt (smbfs) [EMAIL PROTECTED]:/root> Ruben ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: [lorenl@alzatex.com: Re: Mounting a samba share on boot?]
Loren M. Lang wrote: On Mon, Jan 31, 2005 at 12:38:53PM +, Mark Ovens wrote: Loren M. Lang wrote: >replacing MYWORKGROUP, SERVER, USER, secret as neccessary. Make sure >nsmb.conf is only readable by root. Add the following line to fstab: > >//[EMAIL PROTECTED]/share /mnt/share smbfs rw 0 0 > PMJI, but do you know if it's possible to handle a share name containing a space when mounting smb filesystems using fstab? I tried "//[EMAIL PROTECTED]/Drive C" '//[EMAIL PROTECTED]/Drive C' //[EMAIL PROTECTED]/Drive\ C None of these worked. I know that using spaces in filenames is a Bad Idea, but this is Windows we're talking about here ;-) A random guess might be to try: //[EMAIL PROTECTED]/Driver%20C %20 refers to the ascii character with hex value 20 which is space. It's what webservers use for getting around spaces, samba might too.` I'd be really curious to see if this works. Nope: //[EMAIL PROTECTED]/Drive%20C/smb2smbfs rw,noauto 0 0 postbag# mount /smb2 Password: smbfs: unable to open connection: syserr = No such file or directory Using \x20 produced the same result. The other three that I mentioned all produce: postbag# mount /smb2 fstab: /etc/fstab:17: Inappropriate file type or format fstab: /etc/fstab:17: Inappropriate file type or format mount: /smb2: unknown special file or file system Which suggests that it's interpreting the space as a delimiter and ignoring the escapes. Mark --- avast! Antivirus: Outbound message clean. Virus Database (VPS): 0505-0, 31/01/2005 Tested on: 31/01/2005 15:41:20 avast! - copyright (c) 2000-2004 ALWIL Software. http://www.avast.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: [lorenl@alzatex.com: Re: Mounting a samba share on boot?]
On Mon, Jan 31, 2005 at 12:38:53PM +, Mark Ovens wrote: > Loren M. Lang wrote: > >replacing MYWORKGROUP, SERVER, USER, secret as neccessary. Make sure > >nsmb.conf is only readable by root. Add the following line to fstab: > > > >//[EMAIL PROTECTED]/share /mnt/share smbfs rw 0 > >0 > > > > PMJI, but do you know if it's possible to handle a share name containing > a space when mounting smb filesystems using fstab? > > I tried > > "//[EMAIL PROTECTED]/Drive C" > '//[EMAIL PROTECTED]/Drive C' > //[EMAIL PROTECTED]/Drive\ C > > None of these worked. I know that using spaces in filenames is a Bad > Idea, but this is Windows we're talking about here ;-) A random guess might be to try: //[EMAIL PROTECTED]/Driver%20C %20 refers to the ascii character with hex value 20 which is space. It's what webservers use for getting around spaces, samba might too.` I'd be really curious to see if this works. > > If it is not possible then perhaps a PR is needed to get this addressed? > In my case I renamed the share on the Windows box (which broke a few > shortcuts) but this may not always be possible - in a corporate > environment for example. > > Regards, > > Mark > > > > > --- > avast! Antivirus: Outbound message clean. > Virus Database (VPS): 0504-4, 28/01/2005 > Tested on: 31/01/2005 12:38:54 > avast! - copyright (c) 2000-2004 ALWIL Software. > http://www.avast.com > > -- I sense much NT in you. NT leads to Bluescreen. Bluescreen leads to downtime. Downtime leads to suffering. NT is the path to the darkside. Powerful Unix is. Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc Fingerprint: B3B9 D669 69C9 09EC 1BCD 835A FAF3 7A46 E4A3 280C ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: [lorenl@alzatex.com: Re: Mounting a samba share on boot?]
Loren M. Lang wrote: replacing MYWORKGROUP, SERVER, USER, secret as neccessary. Make sure nsmb.conf is only readable by root. Add the following line to fstab: //[EMAIL PROTECTED]/share /mnt/share smbfs rw 0 0 PMJI, but do you know if it's possible to handle a share name containing a space when mounting smb filesystems using fstab? I tried "//[EMAIL PROTECTED]/Drive C" '//[EMAIL PROTECTED]/Drive C' //[EMAIL PROTECTED]/Drive\ C None of these worked. I know that using spaces in filenames is a Bad Idea, but this is Windows we're talking about here ;-) If it is not possible then perhaps a PR is needed to get this addressed? In my case I renamed the share on the Windows box (which broke a few shortcuts) but this may not always be possible - in a corporate environment for example. Regards, Mark --- avast! Antivirus: Outbound message clean. Virus Database (VPS): 0504-4, 28/01/2005 Tested on: 31/01/2005 12:38:54 avast! - copyright (c) 2000-2004 ALWIL Software. http://www.avast.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
[lorenl@alzatex.com: Re: Mounting a samba share on boot?]
Sorry, forgot to hit group reply. - Forwarded message from "Loren M. Lang" <[EMAIL PROTECTED]> - Date: Mon, 31 Jan 2005 02:32:14 -0800 From: "Loren M. Lang" <[EMAIL PROTECTED]> To: Mac Mason <[EMAIL PROTECTED]> Subject: Re: Mounting a samba share on boot? On Mon, Jan 31, 2005 at 12:42:29AM -0800, Mac Mason wrote: > Can anybody point me at some documenation for mounting a samba share at boot > time? I'm used to the linux-style trick of adding it to fstab and pointing it > at a credentials file, but am pretty sure that won't work in FreeBSD. Actually, it does, but it's a little different. I use smbfs mounted automatically by fstab on fbsd all the time. Setup the file /etc/nsmb.conf as follows: # First, define a workgroup. [default] workgroup=MYWORKGROUP [SERVER:USER] password=secret replacing MYWORKGROUP, SERVER, USER, secret as neccessary. Make sure nsmb.conf is only readable by root. Add the following line to fstab: //[EMAIL PROTECTED]/share /mnt/share smbfs rw 0 0 replacing user, server, share, and the local mount point as neccessary. The permissions for files in the mounted fs will be owned by the user and group of /mnt/share and files will have the same permissions as /mnt/share, but directories will allow have execute permission everywhere that they have read permission so I set /mnt/share with permissions 644 even though it's a directory and set the owner and group to my usual user. Before mount: $ ls -ld /mnt/share drw-r--r-- 1 user users 16384 Dec 31 1969 /mnt/share After mount: b$ ls -l /mnt/proj -rw-r--r-- 1 user users1120810 May 14 2004 some-file drwxr-xr-x 1 user users 16384 Oct 24 23:35 a-directory > > I'm running 5.3-RELEASE. > > Thanks! > > --Mac > > -- > Julian "Mac" Mason[EMAIL PROTECTED] > Computer Science '06 (909)-607-3129 > Harvey Mudd College -- I sense much NT in you. NT leads to Bluescreen. Bluescreen leads to downtime. Downtime leads to suffering. NT is the path to the darkside. Powerful Unix is. Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc Fingerprint: B3B9 D669 69C9 09EC 1BCD 835A FAF3 7A46 E4A3 280C - End forwarded message - -- I sense much NT in you. NT leads to Bluescreen. Bluescreen leads to downtime. Downtime leads to suffering. NT is the path to the darkside. Powerful Unix is. Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc Fingerprint: B3B9 D669 69C9 09EC 1BCD 835A FAF3 7A46 E4A3 280C ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"