Saving Files to SAMBA

From BCCD 3.0

Jump to: navigation, search

Mounting the SAMBA Share

Become Root

[bccd@mocha]>su -

The password is letmein (or see the login splash screen for your image's root password).

Make a Mount Point

Make the "mount point" on a read-write area of the BCCD system:

mkdir /mnt/rw/samba

Make a Credentials File

This step is one of added security to prevent you from sending your username and password in cleartext over the network. It also supports usernames with a space (Windows style) and allows for passwords with commas, where specifying the username and password in a command-line SAMBA mount would not. With your favorite text editor, create a file named credentials (or whatever you want to call it). Open the file, and once inside of it, type:

username = myname
password = mypassword

where myname is your SAMBA username and mypassword is your SAMBA password. Save and close the file, then issue:

[root@mocha]>mount -t smbfs -o credentials=credentials //sambashare /mnt/rw/samba

where credentials is your credentials file, //sambashare is the SAMBA share that you're mounting, and /mnt/rw/samba is the local mountpoint.

Unmounting the SAMBA Share

On a Unix-style system, drives that are mounted cannot be arbitarily removed. To unmount the share, you will need to do a few simple things:

Make sure that you are not currently navigating the mounted disk. A good way to do this is to issue cd from all of your shells, or pwd to make sure that you don't have /mnt/rw/samba (or where ever it may be mounted) as part of your current working directory.

Make sure that you don't have any programs running that have been started when you had the SAMBA share mount in your current working directory. This is uncommon, but can be frustrating when you can't seem to tell why the SAMBA share won't unmount. Once you have met these conditions, you need to unmount the disk partition.

[root@mocha:~]# umount /mnt/rw/samba

[Note that there is no "n" in umount. It's missing. If you find it, please let us know so that we can put it with the "e" that we found left out of /etc/resolv.conf]


That should do it!

Personal tools