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!

Howto install and config samba

Windows Networking

Howto install and config samba

by  OpenBsdRulez  Posted    (Edited  )
###################samba windows networking ################

# cd /usr/ports/net/samba && make install clean

=> turn on samba in /etc/rc.conf.local

# vi /etc/rc.conf.local
smbd=YES
nmbd=YES

# vi /etc/rc.local

(put this in rc.local)
if [ -f /etc/samba/smb.conf ]; then
if [ X"${smbd}" = X"YES" -a -x /usr/local/libexec/smbd ]; then
echo -n ' smbd'; /usr/local/libexec/smbd -D
fi

if [ X"${nmbd}" = X"YES" -a -x /usr/local/libexec/nmbd ]; then
echo -n ' nmbd'; /usr/local/libexec/nmbd -D
fi
fi

(end of file)

# cp /etc/samba/smb.conf /etc/samba/smb.conf.backup
# vi /etc/samba/smb.conf
(Use dd to delete everything and just put)
(This worked for me you have the backup for all the info in the file)

[global]
workgroup = PING
server string = Samba Server
hosts allow = 192.168.0. 127.0.0.1
log file = /var/log/smbd.%m
max log size = 50
security = user
os level = 20
dns proxy = no
encrypt passwords = yes
load printers = no


[myshare]
comment = Music stuff
path = /share
valid users = user user2 user3
public = yes
writable = yes
printable = no
browseable = yes
create mask = 0765

(end of file)

=> add users :

# smbpasswd -a user

=> give good rights to the dir:
# chown -R user:user /share
# chmod 700 -R /share

=> start:

# /usr/local/libexec/smbd -D
# /usr/local/libexec/nmbd -D

=> up and running
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