PDA

View Full Version : Automount Shared Drives



Ash M
24-08-2006, 12:13 AM
Hey,

I have a linux server with three hard drives shared on it.
I want to be able to have my XP machine auto mount those drives every time it boots up.

However, it will not allow me to connect to them unless I enter my username and password manually.

I've added a samba user on the linux box (and a regular shell user) with the same name and password as the xp box to no avail.

Permissions on the linux drives aren't the problem either.

any ideas?

TGoddard
24-08-2006, 12:43 AM
Can you write a script to run on startup on the XP computer? You have to store the username and password there to do so, but this could solve your problem.

drcspy
24-08-2006, 07:21 AM
aside from that there is also the possibility of using a program like 'ghostmouse' which records mouse movements and then replays them. You could record the process of copy/pasting the password etc and cliking OK or whatever then set the recording to run at startup thuse you woulnd't have to 'do' anything.......it'd be all automated...

Rob99
24-08-2006, 10:26 AM
I know this is of no help, but my mepis servers shares are always avaliable on my other XPpro computer as mapped drives even after a reboot of XP, not sure if I reboot mepis if they will still be mapped, dont normally have to reboot mepis.

Erayd
24-08-2006, 01:45 PM
auto-mounting drives at bootup is easy to do, and doesn't need any third party software - XP comes with a small utility (net.exe) that can do the job. The following line of code can either be placed in a shortcut / batch file in the global/user startup folder, or as a string value in the global/user run key in the registry ([HKLM|HKCU]/Software/Microsoft/Windows/CurrentVersion/Run). Replace 'L' with the drive letter of your choice, or if you wish to mount it without a drive letter, you can omit this completely.
net use L: \\server\share /user:username passwordThe other way of doing this is to run the command once only, but add /p to the end of it - this makes the mount persistant, but windows will occasionally drop it anyway, so running the command on startup is often a better option.

If you want to mount the windows share from the Linux machine, add the following line (MUST have a trailing newline) to /etc/fstab.
Debian/Ubuntu:
//server/share /path/to/mountpoint -t smbfs -o nouser,users,fmask=777,dmask=777,username=username ,password=password 0 0
Redhat/Fedora:
//server/share /path/to/mountpoint -t cifs -o nouser,users,file_mode=777,dir_mode=777,username=u sername,password=password 0 0

Apologies for the incorrect whitespacing in the Linux commands - seems to be a problem with vBulletin. Note on the file & directory permissions: you may want to change these, 0777 is world-writable.