[CS-FSLUG] mounting smb share as user

David dmcglone at sbcglobal.net
Fri Nov 4 12:34:49 CST 2005


On Thursday 03 November 2005 3:16 pm, Tim Young wrote:
> You would have an entry in fstab that would look something like:
> //servername/sharename /mountdir smbfs
> username=USERNAME,password=PASSWORD 0 0
>
> Otherwise you can add the information to the smbmount command:
>
> smbmount //servername/sharename /mountdir -o
> username=USERNAME,password=PASSWORD
>
> The manpage for smbmount states that passwords set in this way will fail
> if the password contains certain characters, like commas and
> semicolins.  Use the password variable if your password contains one of
> these.
>
>     - Tim
>
> Ritchie, Josiah S. wrote:
> >I think you want a mount option in /etc/fstab, user.
> >
> >You can have multiple options delimited by a ,. For example:
> >/dev/hda1 /boot ext2 noauto,rw,user 0 0
> >
> >JSR/
> >
> >-----Original Message-----
> >From: Christiansource-bounces at ofb.biz
> >[mailto:Christiansource-bounces at ofb.biz] On Behalf Of David
> >Sent: Thursday, November 03, 2005 2:42 PM
> >To: A Christian virtual Free Software and Linux Users Group.
> >Subject: [CS-FSLUG] mounting smb share as user
> >
> >Can anyone tell me how I can mount an smb share as user instead of root?
> >
> >So far I have set up my smb shares to auto mount on boot, but they mount
> >as
> >root and I as a user do not have write access which I would like to
> >have.
> >
> >Anybody have any ideas?
> >
> >Also, Josiah, thanks for the help on the last question, I found the file
> >I was
> >looking for in /etc/rc.d/rc .local

Thanks Josiah and Tim.

Here is what I did, which is pretty close to Tim's suggestions

I created a file in /home/dmcglone and put my username and password and only 
allowed root to read the file.

Then I changed permissions on the share to allow only root and dmcglone to RWX

Then I added these lines to fstab

//192.168.2.3/d /media/d smbfs 
credentials=/home/dmcglone/.smbpasswd,uid=500,gid=500 0 0
//192.168.2.3/e /media/e smbfs 
credentials=/home/dmcglone/.smbpasswd,uid=500,gid=500 0 0
	
cool huh?

Next project: Find out why DVD player plays choppy video.

Thanks again.
David M.




More information about the Christiansource mailing list