[Solved] - SMB Shares - Issues with SMB shares

Hi,
Able to access the SMB shares using the osmc user. All the shares are visible and usable using the “osmc” user.

Now, would like to do two things, 1) Setup a public folder, which anyone is able to login without any user/ pwd. and 2) Add a guest user with read only access to some of the folders.

Tried to add a guest user, and added it to the smb.
sudo useradd guestuser m -G users
sudo passwd guestuser
sudo smbpasswd -a guestuser

Below is what the smb.conf file.

osmc@osmc:/etc/samba$ cat /etc/samba/smb.conf
[global]
workgroup = WORKGROUP
usershare allow guests = yes
#security=share
security=user
follow symlinks = yes
wide links = no
unix extensions = no
lock directory = /var/cache/samba
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
log level = 1

[osmc_home]
browsable = yes
read only = no
valid users = osmc
path = /home/osmc

[public]
browsable = yes
read only = no
valid users = guestuser
path = /media/wdHddRishi/Data/share/

I see all the shares in the network, but able to login only to osmc_home using the osmc user. Any help would be appreciated.

FYI - Using the RPi2 RC and installed smb from the app store.

What are the file permissions of this folder?

Pleasae provide output of;
ls -al /media/wdHddRishi/Data/share

osmc@osmc:/media/wdHddRishi/Data/share$ pwd
/media/wdHddRishi/Data/share
osmc@osmc:/media/wdHddRishi/Data/share$ ls -la
total 4
drwx------ 1 osmc osmc 0 Mar 19 22:26 .
drwx------ 1 osmc osmc 4096 Mar 7 13:28 …
drwx------ 1 osmc osmc 0 Mar 19 22:26 Public
osmc@osmc:/media/wdHddRishi/Data/share$ chmod +777 Public/
osmc@osmc:/media/wdHddRishi/Data/share$ ls -la
total 4
drwx------ 1 osmc osmc 0 Mar 19 22:26 .
drwx------ 1 osmc osmc 4096 Mar 7 13:28 …
drwx------ 1 osmc osmc 0 Mar 19 22:26 Public
osmc@osmc:/media/wdHddRishi/Data/share$

Somehow, unable to change the permissions also.

Was able to figues this out, posting what the issues were.

  1. Was not able to change the file/folder permissions of the mounted drive - figured out that it was because it was mounted as a default ntfs drive. Changed the mounting by editing /etc/fstab
  1. Once this was done, it was a breeze, change the permissions and then add new user with read only access. My smb.conf file looks same as I had mentioned above.