[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Really stupid question...



>Ivan Teliatnikov wrote:
>
>  
>
>>On Mon, 2006-02-20 at 13:17 +0700, mslinuz wrote:
>> 
>>
>>    
>>
>>>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.
>>>   
>>>
>>>      
>>>
>>I have about 500+ users (students). I do not like to store user
>>passwords as clear text in user's home directory. Is there way to go
>>around this. 
>>
>>    
>>
>That's why 0700 file mask is recommended or 0500.
>And have the script name not to "show up". Name it "fancybash.sh" or
>something
>inrelated ;-)
>You can find yourself the most secure way to place the script, but for
>this to work it needs to be stored in a place where your user have access
>into it.
>But if the shared samba folder use the same authentication ( user/pwd ) for
>every user, you could have root do the mount thing.
>
>  
>
Sorry for wrong info, I mean if the samba shared folder is the same folder
that needed by every user then you can create a directory which
accessible for
all users and mounting it via /etc/fstab.
Create a group where all of your users must be added into. And have the
share
folder mapped with the group pemission.
For example :

//serverpath/thesharedfolder  /mnt/samba  smbfs
user,password=smbpassword,uid=1000
,gid=1000,username=smbusername,auto  0  0

I believe there are more advanced and easier ways to do it. But those
are the things
I usually do.


Send instant messages to your online friends http://asia.messenger.yahoo.com 



Reply to: