LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Mounting XP Network Drive on Linux machine works manually but not on boot up? (https://www.linuxquestions.org/questions/linux-networking-3/mounting-xp-network-drive-on-linux-machine-works-manually-but-not-on-boot-up-690370/)

tcarr 12-13-2008 02:55 PM

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!

fordeck 12-13-2008 03:11 PM

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

Regards,
Fordeck

tcarr 12-13-2008 09:47 PM

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.

jstephens84 12-13-2008 11:26 PM

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.

tredegar 12-14-2008 06:19 AM

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

alexhwest 12-26-2008 05:00 PM

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.

jschiwal 12-27-2008 01:32 PM

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.


All times are GMT -5. The time now is 10:22 AM.