Samba – Network Access Denied

Samba is a linux application that allows for directory paths and printers on a linux operating system to be shared on a network. One of the most common uses for Samba, and most frustrating to setup, is accessing a samba shared directory path from linux to a Windows computer. While I have read many a web post about the benefits of learning all about Samba, I really do not have an interest in becoming a Samba expert. I just want my file path shares to work!

I have literally spent hours researching and trying different configurations to get this setup to work properly. The benefits of accessing linux files from Windows is especially true when you are dealing with a webserver and you want to edit scripts and html files on the fly. Since most development tools and workstations are windows based, it speeds up the development time incredibly if you can instantly access your public_html directory, or for that matter, all of your linux operating systems folder paths from your windows workstation.

For my own setup, I choose just to access the /homes/ directory where I have my website stored. I prefer not to have direct write access to configuration files stored in /etc/ or /var/ for fear of accidentally deleting or overwriting one of these important files. Also, make sure that you keep proper backup files of your public_html directory before you start directly editing your web files!

So, without further explaining, here is my sample Samba configuration file that you can use for your own purposes. This is the smb.conf file:

obey pam restrictions = Yes 
passwd program = /usr/bin/passwd %u 
dns proxy = No 
netbios name = NAME ON THE NETWORK 
printing = cups 
password server = None 
default service = homes 
path = /home/HOME DIRECTORY 
workgroup = NAME OF NETWORK 
os level = 20 
security = SHARE 
max log size = 0 
guest ok = yes 
guest account = root 
pam password change = Yes

comment = Home Directories 
valid users = %S 
writeable = yes 
create mask = 0664 
directory mask = 0775 
browseable = No 

comment = All Printers 
path = /var/spool/samba 
printable = Yes 
browseable = No 

guest account = root 
writeable = yes 
write list = nobody 
allow hosts = WINDOWS IP

If this configuration file helps you with your samba share issues, then please let me know.

Also, one important note about encrypted passwords. You do not need to turn off encrypted passwords to get a samba share to work in Windows. This is commoningly done by editing the registry. If you have enabled plaintextpasswords, then go back into the windows registry, search for enableplaintextpasswords, and set the value to 0.

Good Luck with your Samba Share adventures!

About The Celtic Highlander

So, you might be wondering now how did Celtic Radio come to be? What is our inspiration? Celtic Radio was created to bring together a community of listeners, performers and musicians to share and converse in Celtic culture. Our inspiration for this endeavour is the music, but let’s face it, the radio waves and TV are ruled by an endless barrage of top 40 musicians and performers. Listen to your local AM or FM band and chances are you will not find many Celtic music stations, if you find any at all! How then can the devoted musicians that play at the Irish Festivals and Highland Games ever get heard beyond that venue? How can people discover Celtic music if there is no place to listen? Hence was born the idea of a free 24 hour Celtic Radio station available on the World Wide Web for all to enjoy.
This entry was posted in Linux Apps. Bookmark the permalink.

Leave a Reply