permissions - SMB is giving me NIGHTMARES, shares show but I can't access any folders - Ask Ubuntu


need little setting smb server. haven't been using linux in quite while , wanting dump windows , use box strictly file server media player boxes scattered around house.

i don't need security on shares @ strictly on internal network , media players don't seem want work shares requiring passwords.

here's thing: i've been out of long i'm pretty newbie again, computer shows when try add new media folder in media player, if use ubuntu user name , password can't access folder, , logs show attempt user nobody, session closed. when try access folder in ubuntu, can access smb://main pc , shows folders can't anything. using ubuntu credentials gives me damn error saying permission denied. know i'm overlooking easy that's gonna make me real dunce, pointers appreciated.

well recommend following kickoff. commands run root user or sudo avoid privilege issues.

  1. install samba service packages.
sudo apt-get install samba samba-common python-glade2 system-config-samba 
  1. backup samba default config file.

cp /etc/samba/smb.cnf /etc/samba/smb.cnf.bak

  1. create required directory location- preferably large volume max storage.

mkdir -p /data/sambashare/publicshare

  1. change permission , ownership of created directories.

chmod -r 0775 /data/sambashare/publicshare

chown -r nobody:nogroup /data/sambashare/publicshare

  1. edit samba config file according requirements edit following entries.

vi /etc/samba/smb.cnf

[publicshare] comment = public share path = /data/sambashare/publicshare writable = yes browseable = yes public = yes hosts allow = 127. 192.168. guest ok = yes 

note: assuming internal ip range starts 192.168.xx.x, y host allow = in above code has 192.168. if differs in case try editing accordingly, dont miss spaces given between host's range.

the publicshare folder accessible without user , password. if require group , user managing can, need add "valid users = "in above code. can opt preferred name , change accondingly. codes self explainatory.

  1. add group samba "mysmbgrp":
addgroup mysmbgrp 
  1. add user group mysmbgrp
adduser user1 -g mysmbgrp 
  1. assign password form samba users login
smbpasswd -a user1 
  1. enable user account samaba login.
smbpasswd -e user1 
  1. restart services.
sudo service smbd stop  sudo service nmbd stop  sudo service smbd start  sudo service nmbd start 

Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User

sql server - "Configuration file does not exist", Event ID 274 - Super User