LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 04-20-2012, 12:59 PM   #1
dwlamb
LQ Newbie
 
Registered: Apr 2012
Posts: 4

Rep: Reputation: Disabled
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?

Last edited by dwlamb; 04-20-2012 at 01:08 PM. Reason: clean-up code quotes
 
Old 04-20-2012, 01:52 PM   #2
joker20
Member
 
Registered: Sep 2004
Location: 127.0.0.1
Distribution: Slackware/Ubuntu/CentOS
Posts: 286

Rep: Reputation: 31
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

Last edited by joker20; 04-20-2012 at 01:54 PM.
 
Old 04-23-2012, 04:31 PM   #3
dwlamb
LQ Newbie
 
Registered: Apr 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
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 View Post
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

Last edited by dwlamb; 04-23-2012 at 05:22 PM.
 
Old 04-23-2012, 04:41 PM   #4
joker20
Member
 
Registered: Sep 2004
Location: 127.0.0.1
Distribution: Slackware/Ubuntu/CentOS
Posts: 286

Rep: Reputation: 31
read the man pages for smbclient then
 
  


Reply

Tags
cifs, samba


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
'broken pipe' error when attempting to write to windows share bowens44 Linux - General 1 07-20-2009 06:43 AM
NFS mount of smb mount of windows share: permission denied problem :( Bagatur Linux - Networking 4 07-07-2009 12:34 PM
mount windows share export to samba share -> improve network performance tuning newuser77 Linux - Server 1 07-23-2008 12:28 PM
Mount windows share nkutty Linux - Networking 2 06-08-2008 11:54 PM
when trying to mount a windows share I'm getting jcombs_31 Slackware 11 01-04-2006 07:48 PM


All times are GMT -5. The time now is 01:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration