Re: Really stupid question...
Andy Anderson wrote:
> Okay, I'm sure everyone here knows how to do this
> except me...
>
> I have a server with some disk space shared using
> Samba. Each user has an account and a home share.
> When a user logs in to a workstation, I'd like their
> home share on the Samba server to be automatically
> mounted, and then unmounted when they log off.
> I'm using Gnome/GDM with Debian Sarge. I'm sure
> there is an easy way to do this that I haven't found...
>
> Thanks for any assistance in this.
>
I'm sorry if I misunderstand, but after reading your mail, I have 2
assumtions:
1. Users use debian with gnome/gdm in the different machine and need
to mount the share everytime they log in.
Create a directory for mounting user share.
Then create a file with 0700 for everyuser place in a save place :
#!/bin/bash
smbmount //serveraddress/sharedfolder /pathtomountingpoint -o
username=whatever,password=pwd;
exit 0;
add these line to $HOME/user/.bashrc :
if [ -f PATHTOSCRIPTFILE ]; then
. PATHTOSCRIPTFILE;
fi
that's all.
2. Users use windows :
Create a batch file with these lines and place it in a very safe
place.
@echo off
net use Z: \\serveraddress\sharedfolder /user:username password
you can modify the drive letter to suit your need.
open regedit ( Start->Run->Regedit )
browse to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Current
Version\Run
create a String value give the unique name and modify its content
"PATHTOBATCHFILE"
Or just place the file into user's Startup folder.
cheers,
mslinuz
Send instant messages to your online friends http://asia.messenger.yahoo.com
Reply to: