Mounting XP Network Drive on Linux machine works manually but not on boot up?
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.