Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to set up a basic Samba share for Windows clients.

Networking

How to set up a basic Samba share for Windows clients.

by  butchrecon  Posted    (Edited  )
LINUX
Samba Share Setup
(For Windows Clients)


1.) Ensure that Samba is installed and running. (Usually installed with Newer LINUX versions)
2.) Create a folder that you want to share. (There is always a /public folder installed with LINUX for share use.
3.) Add a user named pcguest. Type at prompt ôadduser pcguestö. Then type ôpasswd pcguestö. For password hit enter. (May have to hit enter several times)
4.) Vi /etc/samba/smb.conf. Under global edit ONLY the following to match.
workgroup = (yourworkgroup)
browseable = yes
force user = root
force create mode = 777
server string = Samba Server
guest account = pcguest
hosts allow = (first 3 octets of the IP scheme you want to access the server)
printcap name = /etc/printcap
load printers = yes
printing = lprng
log file = /var/log/samba/%m.log
max log size = 50
security = share
socket options = TCP_NODELAY
local master = no
domain master = no
preferred master = no
interfaces = (Your LINUX Machines IP address)/24
Example: 192.168.1.1/24

Under Share Definitions Edit the following.
[public]
path = /(the folder you want to share)
public = yes
writable = yes
create mask = 0777
browseable = yes


[tmp]
path = /tmp
public = yes
writable = yes
create mask = 0777
browseable = yes

5.) Once the editing is completed hit esc and shift zz to save.
6.) Now do a ps ûef | grep mbd and kill all processes for nmbd and smbd. To kill the process, look at the process # and type kill -9 (process #)
7.) Type nmbd ûD ûn (the name you want to show up in windows) Example: nmbd -D -n LINUX1
8.) Type smbd ûD
9.) Go to a Windows PC and look in Network Neighborhood for the share you just created. If it is there you are near completion, if not ensure that the settings in the smb.conf are there and correct. Also grep the mbd (or nmbd and smbd ) and ensure they are running.
10.) On the LINUX machine vi the /etc/rc and add the following lines to the end of it (This will set the nmbd and smbd clients to start automatically on bootup) /usr/sbin/nmbd ûD ûn (the name you want to show up in windows) and /usr/sbin/smbd ûD
11.) Restart.


Hope this helps. As I said this is for basic Samba sharing.

Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top