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 12-13-2008, 02:55 PM   #1
tcarr
LQ Newbie
 
Registered: Dec 2008
Posts: 3

Rep: Reputation: 0
Mounting XP Network Drive on Linux machine works manually but not on boot up?


I know this has been covered in many threads before, but I'm stuck not finding my exact situation or an answer.

I'm a newbie using a Debian Linux machine as the client and Windows XP machine as the server. I have successfully mounted the XP Network drive on the Linux machine using commands from the root terminal:

mount -t smbfs -o username="Windows Username",password=windowspassword //XPcomputername/folder /mountpoint/


However when I put the command in the ect/fstab file as suggested in several posts, I don't get any result on boot up. I.e. I can't get the network drive to mount on start up, I always have to manually mount it from the root terminal.

Any suggestions?

Thanks!
 
Old 12-13-2008, 03:11 PM   #2
fordeck
Member
 
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
Perhaps you could post the contents of your /etc/fstab file so we can see what you are trying to do?

Regards,
Fordeck
 
Old 12-13-2008, 09:47 PM   #3
tcarr
LQ Newbie
 
Registered: Dec 2008
Posts: 3

Original Poster
Rep: Reputation: 0
fstab entry

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda1 / ext3 defaults,errors=remount-ro 0 1
/dev/hda5 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
//HOME-PC/MYFOLDER /home/mountpoint smbfs username=name,password=pw 1 2

#mount -t smbfs -o username=name,password=pw //HOME-PC/MYFOLDER /home/mountpoint

I tried two different lines in fstab to get it to work.

Thanks for looking.
 
Old 12-13-2008, 11:26 PM   #4
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
Why dont you just create a script under /etc/rc2.d that will run that command for you. call the script S99mntwinshare or whatever just place S99 so that it runs last. You may have to change the location from rc2.d to whatever your default runtime is.
 
Old 12-14-2008, 06:19 AM   #5
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
fstab is trying to mount the drive before the network is up.
So it doesn't work.
Put the command you need to mount the drive in /etc/rc.local just before the final line that says exit 0
 
Old 12-26-2008, 05:00 PM   #6
alexhwest
Member
 
Registered: Dec 2008
Location: Cleveland, OH
Distribution: Ubuntu
Posts: 30

Rep: Reputation: 15
Try this:

//windows.server.ip.address/sharename /mount/point smbfs default,credentials=/name/of/file 0 0

in the fstab

of course, the mount point has to be writable

the credentials=file should be a text file containing

username = whatever
password = whatever

And chmod go-rwx the file so only root can read it.

If this doesn't work, I would be curious to see what the smbmount command that DOES work for you looks like.
 
Old 12-27-2008, 01:32 PM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
To delay the mounting of the share until after the network is up, add the _netdev mount option. Are you using a very old kernel? The "smbfs" filesystem is depreciated. Use "cifs" instead. To enable you to read and write the share, in case the host doesn't understand the unix extentions to cifs, use "uid=<yourusername>" and appropriate "file_mode=" and "dir_mode=" options. These are fallbacks, that may not be used when mounting a Samba share but are when mounting an XP share.

You can instead use permissions that keep the root owner but allow "others" read/write access.

Please see the mount.cifs, mount and mount.smbfs (if you keep using it) man pages for more details.
 
  


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 a windows drive on a Linux machine (connected via an ethernet network) eddydw Linux - Networking 13 01-03-2009 03:13 PM
Mounting an External Hard Drive Manually Using Terminal pjmaggitti Linux - Hardware 3 02-17-2007 07:57 AM
Help required!!!! Mounting a network drive at Boot up YaAqoB Linux - Networking 5 08-12-2005 08:13 AM
mounting network drive on boot Acidwarp01 Linux - Networking 5 08-30-2003 08:58 AM
Mounting a Solaris SCSI drive on Linux machine Crac Linux - Newbie 4 05-29-2002 07:08 AM

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

All times are GMT -5. The time now is 03:38 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
Open Source Consulting | Domain Registration