Mounting SMB/CIFS shares in OpenBSD
July 2010
Sun Mon Tue Wed Thu Fri Sat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
About
This site is an effort to share some of the base knowledge I have gathered through all this years working with Linux, FreeBSD, OpenBSD, Python or Zope, among others. So, take a look around and I hope you will find the contents useful.
Recent Entries
Recent Comments

collective.solr 1.0rc1 (Release candidate)
2010-07-30 plone.org releases

Products.cron4plone 1.1.5rc1 (Release candidate)
2010-07-30 plone.org releases

vs.dashboardmanager 0.2.6.1
2010-07-30 plone.org releases

Heads up! OpenBSD now supports multi-byte characters!
2010-07-30 OpenBSD Journal (undeadly.org)

Setting the Focus Distance on the Epson V700 Scanner
2010-07-29 betabug

Gnome Census Released (and Red Hat 16% vs Canonical 1% Flame)
2010-07-29 Ramble on

Cómo conectarse a bases de datos SQLite desde NetBeans
2010-07-29 vaites (dmnet)

Diferencias cambiando de Perl a Python
2010-07-28 blackshell

Monos y cacahuetes
2010-07-28 userlinux.net

No Gazoline
2010-07-28 betabug

[c2k10] (Part 5)
2010-07-28 OpenBSD Journal (undeadly.org)

Cómo evitar fbc_channel=1 con Facebook Fan/Like Box
2010-07-28 vaites (dmnet)

Copyright Nonsense
2010-07-28 Ramble on

New Plone Usergroup in Charlottesville, VA kicks off July 29th
2010-07-28 plone.org news

Redimensionar la ventana de Firefox sin extensiones
2010-07-27 vaites (dmnet)

ἀφορισμός XII: Silencio
2010-07-27 emereci

New committer: Baptiste Daroussin (ports)
2010-07-27 FreeBSD latest news

[c2k10] The Hackathon BBQ (Part 4) - June 25 - July 3, 2010, Edmonton, Alberta, Canada
2010-07-26 OpenBSD Journal (undeadly.org)

Setting up Bacula
2010-07-26 Evilcoder

Plone 4 upgrade coming to plone.org
2010-07-25 plone.org news

So I bought a Scanner
2010-07-24 betabug

FreeBSD 8.1 RELEASED
2010-07-24 Evilcoder

FreeBSD 8.1-RELEASE Available
2010-07-23 FreeBSD latest news

Announcing Tornado 1.0
2010-07-23 Ramble on

Sauna Sprint just around the corner
2010-07-22 plone.org news

April-June, 2010 Status Report
2010-07-22 FreeBSD latest news

O culeiro
2010-07-21 emereci

Limitando usuarios ssh en Mercurial
2010-07-21 userlinux.net

The Wire
2010-07-20 emereci

Comienza la mudanza, nos vamos a Reading
2010-07-18 blackshell

Recent Trackbacks
Categories
OpenBSD (8 items)
BSD (0 items)
FreeBSD (12 items)
Linux (2 items)
Security (3 items)
Python (18 items)
Zope (13 items)
Daily (120 items)
e-shell (8 items)
Hacks (7 items)
PostgreSQL (3 items)
OSX (7 items)
Nintendo DS (0 items)
enlightenment (0 items)
Apache (3 items)
Nintendo Wii (0 items)
Django (23 items)
Music (9 items)
Plone (7 items)
Varnish (0 items)
Lugo (1 items)
Sendmail (-1 items)
europython (7 items)
Archives

Syndicate this site (XML)

RSS/RDF 0.91

07 abril
2008

Mounting SMB/CIFS shares in OpenBSD

yes!, it works!

Found how just some minutes ago. I was preparing a backup solution for a windows-based network using OpenBSD and rdiff-backup. The idea is very simple:

doing incremental backups from a windows server into an openbsd box

Some windows workstations store some data into a windows (or unix+samba) file server. The data needs to be backed up, just in case. All the information we will backup regularly are the user profiles and a backup directory shared through the whole network (so everyone could put in there everything they need to backup).

As those shares/folders/directories are exported using the SMB/CIFS protocol, I can mount them in the OpenBSD host using sharity-light, an userland implementation of smbfs (which operates in kernel space).

To mount a windows share using sharity-light, you only need an empty directory on your filesystem and do something like:

# shlight //windowsserver/backup /mnt/backup -U windows_user -P someuglypassword
#

NOTE: here windowsserver is a name pointing to the ip address of the windows server, while windows_user and someuglypassword are the user credentials needed to access (in this case) the backup share.

NOTE2: sharity does not allow ip addresses as the server name, and it will fail if you try to use the server.domain.ext naming convention, so you will probably need to add something like that to your /etc/hosts file:

192.168.1.111 windowsserver.mydomain.net windowsserver

After using calling the shlight script, you will be able to access the windows share just as any other mounted file system in OpenBSD:

# df -h
Filesystem       Size    Used   Avail Capacity  Mounted on

[ ... ]

shlight-31463    298G   93.8G    204G    31%    /mnt/backup

In my case, now I can safety run rdiff-backup to create an easy-to-recover full backup (with incrementals) on my local filesystem.

Posted by wu at 19:03 | Comments (0) | Trackbacks (0)
<< OpenBSD to the rescue (II) | Main | Heroes use KDE! >>
Comments
Re: Mounting SMB/CIFS shares in OpenBSD

I trying to use sharity-light whit Windows XP, but i have this error when i run the shlight command:

Kernel: smb_receive_raw: Invalid packet 0x83
Kernel: smb_receive: receive error: -5
Kernel: smb_proc_connect: Failed to send SESSION REQUEST.
error connecting to server: [5] Input/output error

In the FAQ say:

Q: Mounting a share with Sharity-Light results in the following error
message:
error connecting to server: [5] I/O error
A: Sharity-Light is not very good in giving diagnostic messages when
something goes wrong. The above can mean almost anything. You should
check whether:
- The share is correctly imported.
- The server is in user- or share level security (and use the
appropriate password).
- If you have NT4 with service pack 3 or any newer NT product:
Whether you have enabled unencrypted passwords (Sharity-Light can't
do password encryption).

In your implementation, you have this error?

You have any suggestion?

Thanks!
hdc

Posted by: Hernan at noviembre 29,2008 18:10
Re: Mounting SMB/CIFS shares in OpenBSD

Hi hernan.

I fact, I did suffer such problem in one of the implementations. It is related to one configuration parameter in the windows machine. I don't remember actually the exact name, but it has something to do with the way the windows machine manage the password verification (something like "force encrypted password transmission" or similar. You should take a look over the administrative tools of the XP machine.

You can search for that in google, seems like a usual problem even with smbclient/samba and Linux too.

Posted by: Wu at diciembre 01,2008 10:04
Trackbacks
Please send trackback to:http://blog.e-shell.org/57/tbping
There are no trackbacks.
Post a comment