Re: Mounting a samba share on boot?

2012-12-12 Thread Bill Tillman




From: Polytropon free...@edvax.de
To: Bill Tillman btillma...@yahoo.com 
Cc: freebsd-questions@freebsd.org freebsd-questions@freebsd.org 
Sent: Wednesday, December 12, 2012 12:40 AM
Subject: Re: Mounting a samba share on boot?


On Tue, 11 Dec 2012 14:08:38 -0800 (PST), Bill Tillman wrote:
 Typically, Samba is used so that Windows or other SMB type
 OS'es can access the server. That said, I would simplify all
 this with the way I have mine setup. You will of course need
 the shares configured in your smb.conf, then simply put a
 command in your /etc/rc.local or /etc/rc.d/ to launch smdb
 and nmbd. I don't rely on anything in /etc/fstab to use samba.
 It's all in my smb.conf file.

Yes, that would be the other way round, which I thought would
be less probable due to the question presented in the subject.
Terms like mount [...] on boot suggests that FreeBSD would act
as a SMB client here. Of course, the standard way to do things
like this would usually be something like NFS, which is not
very well supported in Windows land (and therefor requiring
SMB stuff).

Delegating the configuration into _one_ file (instead of spreading
it across /etc/fstab, /etc/nsmb.conf and maybe some handcrafted
/usr/local/etc/rc.d script) sounds like a much better approach.




-- 
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

I've heard from more than one person that Samba is no good. Including the IT
guru here where I work. All I know is that  I've been running it for years and
without a single incident. I quietly and reliably allows my Windows workstations
to access my FreeBSD server's like they were very expensive Windows file
servers. Never messed with the printing side of it and don't need to . File 
sharing alone has been worth the investment in time to learn Samba.

As for NFS, I have found, on my network at least that using the TCP and -i
options to keep it from timing out has worked fine.
___
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: Mounting a samba share on boot?

2012-12-12 Thread Jerry
On Wed, 12 Dec 2012 04:27:31 -0800 (PST)
Bill Tillman articulated:

 On Tue, 11 Dec 2012 14:08:38 -0800 (PST), Bill Tillman wrote:
  Typically, Samba is used so that Windows or other SMB type
  OS'es can access the server. That said, I would simplify all
  this with the way I have mine setup. You will of course need
  the shares configured in your smb.conf, then simply put a
  command in your /etc/rc.local or /etc/rc.d/ to launch smdb
  and nmbd. I don't rely on anything in /etc/fstab to use samba.
  It's all in my smb.conf file.
 
 Yes, that would be the other way round, which I thought would
 be less probable due to the question presented in the subject.
 Terms like mount [...] on boot suggests that FreeBSD would act
 as a SMB client here. Of course, the standard way to do things
 like this would usually be something like NFS, which is not
 very well supported in Windows land (and therefor requiring
 SMB stuff).
 
 Delegating the configuration into _one_ file (instead of spreading
 it across /etc/fstab, /etc/nsmb.conf and maybe some handcrafted
 /usr/local/etc/rc.d script) sounds like a much better approach.

NFS is available on Windows 7, it's just not installed by default.

In order to activate the Client for NFS, go into the Control Panel, and
go to Programs and Features. In the left hand column, you'll see a
link for Turn Windows features on or off.

Select that, and it will open a list box that shows all of the optional
components built in to Windows 7. Some are already activated.  Expand
the entry for Services for NFS. There are two check boxes under
that.  Check them and hit OK.  Windows will install those components
and ask to reboot your system. Once you have rebooted, Client for NFS
will be installed.

To use it, go to Administrative Tools-Services for NFS to configure
it. Alternatively, you can use the command line program 'nfsadmin' to
configure.

For other versions of Windows, see: How to install Client for NFS on
Windows: http://support.microsoft.com/kb/324055

I have seen several setups with this sort of integration that worked
just fine.

-- 
Jerry ♔

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__
___
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: Mounting a samba share on boot?

2012-12-11 Thread Tim Daneliuk

On 12/11/2012 10:25 AM, Hanafi Syahroini wrote:

This can be done with appropriate entries in /etc/fstab.  However,
I'd recommend against doing so because, if the SMB server
is unreachable when the FreeBSD system boots, the FreeBSD
box will hang looking for the SMB connection.

A better way is to put a custom script in /usr/local/etc/rc.d/
that initiates the SMB mounts there.  This too could fail, but
it doesn't prevent the OS From booting fully.

--
---
Tim Daneliuk
___
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: Mounting a samba share on boot?

2012-12-11 Thread Polytropon
On Tue, 11 Dec 2012 23:25:56 +0700, Hanafi Syahroini wrote:
 [nothing]

First of all, it's not uncommon to place the question into
the message body (which you did not), and using a descriptive
subject (which you did). :-)

So I assume your question is _how_ to mount a SMB share at
boot.

This can be easily done by adding the required line to the
/etc/fstab file. Because network connection is required to
perform the mount, you could use the late option in
addition to other options you might need. See man mount
for detais, as well as /etc/rc.d/mountlate.

The line would be like this:

//USERNAME@SERVERNAME/share  /smb/share  smbfs  rw,late  0  0

In this example, SERVERNAME is the server to access, and share
the name of the share; /smb/share will be the directory it will
be mounted at.

Access to multiple drive letters would look like this:

//Administrator@WINPC/a$  /smb/a  smbfs  rw,late  0  0
//Administrator@WINPC/c$  /smb/c  smbfs  rw,late  0  0
//Administrator@WINPC/d$  /smb/d  smbfs  rw,late  0  0
//Administrator@WINPC/e$  /smb/e  smbfs  rw,late  0  0
//Administrator@WINPC/f$  /smb/f  smbfs  rw,late  0  0

Here WINPC is the name of the server. Using Administrator
in this case is not safe, but no problem in settings where
people don't care for security anyway. :-)

Also see man smbfs and man fstab for details.

It might be required to put additional information in
/etc/nsmb.conf, for example:

[default]
workgroup=YOUR_WORKGROUP_NAME

[SERVERNAME]
addr=192.168.2.2

[SERVERNAME:USERNAME]
password=TOPSECRET

Substitute SERVERNAME, USERNAME and TOPSECRET for the
organisational information and access credentials that apply.
See man nsmb.conf for details.

Further instructions can easily be found in the online docs:

http://www.freebsd.org/doc/faq/book.html#mount-smb-share

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-samba.html



Note that if you still encounter network problems, it's better
to write a short rc.d style script that performs the mount_smb
commands, and use the proper keywords to have it run when the
network connection is up and running. See man rc.d for
details.


-- 
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: Mounting a samba share on boot?

2012-12-11 Thread Bill Tillman





From: Polytropon free...@edvax.de
To: Hanafi Syahroini han...@zigma-jp.com 
Cc: freebsd-questions@freebsd.org 
Sent: Tuesday, December 11, 2012 11:57 AM
Subject: Re: Mounting a samba share on boot?

On Tue, 11 Dec 2012 23:25:56 +0700, Hanafi Syahroini wrote:
 [nothing]

First of all, it's not uncommon to place the question into
the message body (which you did not), and using a descriptive
subject (which you did). :-)

So I assume your question is _how_ to mount a SMB share at
boot.

This can be easily done by adding the required line to the
/etc/fstab file. Because network connection is required to
perform the mount, you could use the late option in
addition to other options you might need. See man mount
for detais, as well as /etc/rc.d/mountlate.

The line would be like this:

    //USERNAME@SERVERNAME/share  /smb/share  smbfs  rw,late  0  0

In this example, SERVERNAME is the server to access, and share
the name of the share; /smb/share will be the directory it will
be mounted at.

Access to multiple drive letters would look like this:

    //Administrator@WINPC/a$  /smb/a  smbfs  rw,late  0  0
    //Administrator@WINPC/c$  /smb/c  smbfs  rw,late  0  0
    //Administrator@WINPC/d$  /smb/d  smbfs  rw,late  0  0
    //Administrator@WINPC/e$  /smb/e  smbfs  rw,late  0  0
    //Administrator@WINPC/f$  /smb/f  smbfs  rw,late  0  0

Here WINPC is the name of the server. Using Administrator
in this case is not safe, but no problem in settings where
people don't care for security anyway. :-)

Also see man smbfs and man fstab for details.

It might be required to put additional information in
/etc/nsmb.conf, for example:

    [default]
    workgroup=YOUR_WORKGROUP_NAME

    [SERVERNAME]
    addr=192.168.2.2

    [SERVERNAME:USERNAME]
    password=TOPSECRET

Substitute SERVERNAME, USERNAME and TOPSECRET for the
organisational information and access credentials that apply.
See man nsmb.conf for details.

Further instructions can easily be found in the online docs:

http://www.freebsd.org/doc/faq/book.html#mount-smb-share

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-samba.html



Note that if you still encounter network problems, it's better
to write a short rc.d style script that performs the mount_smb
commands, and use the proper keywords to have it run when the
network connection is up and running. See man rc.d for
details.


-- 
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


That's a great answer but let me insert that most people, not all but most, do 
not use Samba to access a server from other FreeBSD servers. So I feel the two 
replies thus far are overkill. Typically, Samba is used so that Windows or 
other SMB type OS'es can access the server. That said, I would simplify all 
this with the way I have mine setup. You will of course need the shares 
configured in your smb.conf, then simply put a command in your /etc/rc.local or 
/etc/rc.d/ to launch smdb and nmbd. I don't rely on anything in /etc/fstab to 
use samba. It's all in my smb.conf file.

However, Polytropon has presented a great answer here.
___
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: Mounting a samba share on boot?

2012-12-11 Thread Polytropon
On Tue, 11 Dec 2012 14:08:38 -0800 (PST), Bill Tillman wrote:
 Typically, Samba is used so that Windows or other SMB type
 OS'es can access the server. That said, I would simplify all
 this with the way I have mine setup. You will of course need
 the shares configured in your smb.conf, then simply put a
 command in your /etc/rc.local or /etc/rc.d/ to launch smdb
 and nmbd. I don't rely on anything in /etc/fstab to use samba.
 It's all in my smb.conf file.

Yes, that would be the other way round, which I thought would
be less probable due to the question presented in the subject.
Terms like mount [...] on boot suggests that FreeBSD would act
as a SMB client here. Of course, the standard way to do things
like this would usually be something like NFS, which is not
very well supported in Windows land (and therefor requiring
SMB stuff).

Delegating the configuration into _one_ file (instead of spreading
it across /etc/fstab, /etc/nsmb.conf and maybe some handcrafted
/usr/local/etc/rc.d script) sounds like a much better approach.




-- 
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: Mounting a samba share on boot?

2012-03-11 Thread Polytropon
On Sun, 11 Mar 2012 20:20:15 +0400, Льоша Лоїк wrote:
{ nothing }

Even though you wrote nothing, I assume that the subject
Mounting a samba share on boot? contains your question.

Answer:

You can put the required line in /etc/fstab, and provide
access details (workgroup, user, password and such stuff)
in /etc/nsmb.conf.

See the manpages for fstab, nsmb.conf and mount_smbfs for
details.

If you encounter problems with networking _not_ being up
when the mount is performed, see the late option described
in man mount. This option is often used for network-mounted
file systems.




-- 
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: [lorenl@alzatex.com: Re: Mounting a samba share on boot?]

2005-02-01 Thread Ruben de Groot
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?]

2005-02-01 Thread Mark Ovens
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]


[lorenl@alzatex.com: Re: Mounting a samba share on boot?]

2005-01-31 Thread Loren M. Lang
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]


Re: [lorenl@alzatex.com: Re: Mounting a samba share on boot?]

2005-01-31 Thread Mark Ovens
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]


Re: Mounting a samba share on boot?

2005-01-31 Thread Ruben de Groot
On Mon, Jan 31, 2005 at 12:42:29AM -0800, Mac Mason typed:
 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.

See nsmb.conf(5)

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?]

2005-01-31 Thread Loren M. Lang
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  00
 
 
 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?]

2005-01-31 Thread Mark Ovens
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]