LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 09-19-2012, 10:39 AM   #1
redhatuser1
Member
 
Registered: Sep 2009
Posts: 55

Rep: Reputation: 0
Mounting a windows share...advice


Hi,

I am trying to mount a windows share permanently...

the following command works 100% but I would like the mount to join after a reboot...

Code:
mnt -t cifs //servername/share$ /mnt/mntpoint -ousername=user1,password=pass1
I have tried adding the following to fstab without any success:
Code:
//servername/share$ /mnt/mntpoint      cifs      credentials=/home/.credfile   0 0
Any help would be useful - could I add the following to CRON:
Code:
@reboot mnt -t cifs //servername/share$ /mnt....
 
Old 09-19-2012, 10:41 AM   #2
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 647

Rep: Reputation: 189Reputation: 189
Add the auto option to those specified in /etc/fstab to have the system auto-mount it at boot-time.
 
Old 09-19-2012, 10:50 AM   #3
redhatuser1
Member
 
Registered: Sep 2009
Posts: 55

Original Poster
Rep: Reputation: 0
thanks, so:

Code:
//servername/share$ /mnt/mntpoint      auto    credentials=/home/.credfile   0 0
I replaced cifs with auto - that didn't work either? do I need both
 
Old 09-19-2012, 10:52 AM   #4
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 647

Rep: Reputation: 189Reputation: 189
No, you need to add auto to the mount options (credentials=...) and not change the filesystem type (cifs):
Code:
//servername/share$ /mnt/mntpoint      cifs      auto,credentials=/home/.credfile   0 0
 
Old 09-19-2012, 10:58 AM   #5
redhatuser1
Member
 
Registered: Sep 2009
Posts: 55

Original Poster
Rep: Reputation: 0
ha - my bad - I put it in the wrong place...

rebooting now to see if it works.
 
Old 09-19-2012, 11:06 AM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Are you sure that the .credfile is in /home, not in /home/username?
Also, what happens if you try to mount it manually with
Code:
mount /mnt/mntpoint
 
Old 09-20-2012, 03:13 AM   #7
redhatuser1
Member
 
Registered: Sep 2009
Posts: 55

Original Poster
Rep: Reputation: 0
Thanks but it is working ok...

the cred file is there hidden...
 
Old 09-24-2012, 02:55 AM   #8
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 647

Rep: Reputation: 189Reputation: 189
Is the issue no more, then?
 
Old 09-25-2012, 03:33 AM   #9
redhatuser1
Member
 
Registered: Sep 2009
Posts: 55

Original Poster
Rep: Reputation: 0
No longer an issue.
 
Old 09-25-2012, 04:11 AM   #10
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 647

Rep: Reputation: 189Reputation: 189
Mark the thread as solved, then
 
  


Reply



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
Mounting Windows share with a space in the share name Suncoast Linux - Networking 1 06-19-2009 10:15 AM
mounting a windows share that contains spaces j-me Linux - Server 5 04-30-2009 04:13 PM
Mounting Windows SHARE on Freebsd. paragkalra *BSD 2 08-12-2008 12:53 AM
Mounting Windows share leupi Linux - Server 10 04-12-2008 08:36 AM
mounting a windows network share? graystarr Linux - Networking 2 11-09-2002 05:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:13 AM.

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
Open Source Consulting | Domain Registration