LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Attempting to Mount Permanent Windows share (http://www.linuxquestions.org/questions/linux-networking-3/attempting-to-mount-permanent-windows-share-940868/)

dwlamb 04-20-2012 12:59 PM

Attempting to Mount Permanent Windows share
 
Does anyone have a tutorial or how-to for mounting a Windows network share of a directory with full read/write privileges? I am running Ubuntu 10.04.

I want to be able to back-up data from my linux box to a share on a Windows machine. I need something that is mounted so I can use rsync from the command prompt.

I've followed how-to's at http://industriousone.com/blog/mount...s-shares-linux and https://wiki.ubuntu.com/MountWindowsSharesPermanently. If I attempt

Code:

sudo mount -a
I receive
Code:

mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

I have successfully amended the hosts file for if I perform

Code:

smbclient -L xp2
all of my shares for that PC are listed

A credentials file is present in the form of

username=daniel
password=remainsAsecret

the path to that file is properly stated in my fstab entry

For either of the tutorials mentioned above, my fstab entry is correct. I use

Code:

//xp2/music /mnt/music_xp2 cifs credentials=/home/daniel/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
or
Code:

//xp2/Music /mnt/music_xp2 cifs exec,credentials=/home/daniel/.smbcredentials 0 0
In either case I am still receiving permission denied.

Can anyone lend assistance?

joker20 04-20-2012 01:52 PM

those documents look dated and im not sure how much of samba configuration steps has changed between then and now.

i know you'll need to configure your smb.conf to contain a new share for the directory, permissions and valid/writeable users.
then you'll need to do a `smbpasswd -a user` and input a password for that user (good idea to use the same password that is on the windows box)
open up ports 137 & 138 udp, 139 tcp and 445 tcp on the linux box
you can then mount the share w/ those credentials locally to test it.

from the windows box you should have access to your linux box's shared directory and can schedule a backup job to do whatever you need to do.

not sure about using rsync to dump data to the windows box, dont quote me on this but i think samab is for sharing only...im sure theres a way to mount a windows share but i havent looked into anything like that.

heres a video walkthrough that looks like it can get you started
http://www.youtube.com/watch?v=p2r0kIB_ItE

dwlamb 04-23-2012 04:31 PM

joker20,

I think you've missed the point of what I am trying to achieve. The how-to's quoted are hardly dated.

I am trying to mount a folder shared by windows on the linux machine, not the other way around as that youtube video demonstrates.

Any documentation I have seen on editing smb.conf relates to making shared resources of the Linux machine available under Windows.

Using samba at the command line to mount shares from Windows is an old method. cifs is the present one.

Quote:

Originally Posted by joker20 (Post 4658558)
those documents look dated and im not sure how much of samba configuration steps has changed between then and now.

i know you'll need to configure your smb.conf to contain a new share for the directory, permissions and valid/writeable users.
then you'll need to do a `smbpasswd -a user` and input a password for that user (good idea to use the same password that is on the windows box)
open up ports 137 & 138 udp, 139 tcp and 445 tcp on the linux box
you can then mount the share w/ those credentials locally to test it.

from the windows box you should have access to your linux box's shared directory and can schedule a backup job to do whatever you need to do.

not sure about using rsync to dump data to the windows box, dont quote me on this but i think samab is for sharing only...im sure theres a way to mount a windows share but i havent looked into anything like that.

heres a video walkthrough that looks like it can get you started
http://www.youtube.com/watch?v=p2r0kIB_ItE


joker20 04-23-2012 04:41 PM

read the man pages for smbclient then


All times are GMT -5. The time now is 11:17 AM.