[Samba] mounting smb shares

Kevin Waterson kevin at oceania.net
Sat Oct 2 12:58:40 GMT 2004

Hi all, new to samba yadda yadda..

I think I am going in the wrong direction here. 
I am setting up an smb server to store photos. These are publicly
available in read only except to the group 'staff'. Yes, I read the
How To. ;)

So in my smb.conf I have this...
   comment = Public Photos
   path = /home/photo
   public = yes
   read only = yes
   write list = @staff

I have added the user 'photo' to the system with the home dir of /home/photo
I have used smbpasswd -a photo and given the user a smb password.
I can list using smbclient -L and I get this...

I can mount the drive from a client like this..
Anonymous login successful

        Sharename      Type      Comment
        ---------      ----      -------
        photodir       Disk      Public Photos
        IPC$           IPC       IPC Service (PHOTO SERVER)
        ADMIN$         IPC       IPC Service (PHOTO SERVER)
Anonymous login successful

        Server               Comment
        ---------            -------
        SAMBA                PHOTO SERVER

        Workgroup            Master
        ---------            -------
        WILDCHERRY           SAMBA

When I do this I am prompted for a password, and simply hit enter and it displays.
Is this a good thing or a bad thing?

I can then mount the share using 
mount -t smbfs // /home/samba/ -o username=photo
and ls shows all the files on the remote smb server i the photo directory.
But, the files therein are not read only, I can delete files from there simply
by doing rm filename.txt
This is bad. I need this to be read only. Where did I go wrong?

Kind regards

"Democracy is two wolves and a lamb voting on what to have for lunch. 
Liberty is a well-armed lamb contesting the vote."

More information about the samba mailing list