หน้าแรก > BSD > How to install samba on OpenBSD 4.9

How to install samba on OpenBSD 4.9

Install

PKG_PATH=http://www.ftp.ne.jp/OpenBSD/4.9/packages/i386/

pkg_add -v samba-3.5.6p4.tgz

Configure

smb.conf :  /etc/samba/smb.conf

[homes]
comment = Home Directories
browseable = no
writable = yes
path = /home/kz/
valid users = kz

adduser -d /home/kz -m kz

smbpasswd -a kz

Don’t forget the trailing / on folder path or else your shared folder will not refresh itself (require manual refresh F5)

Add samba to startup script

openBSD 4.9 introduces, rc.d, a new start up script for external packages, similar to FreeBSD. In /etc/rc.conf, put samba in to rc_scripts

# rc.d(8) daemons scripts
# started in the specified order and stopped in reverse order
rc_scripts=”samba”

If you check the folder /etc/rc.d/ you will see samba start up script which calls smbd and nmbd

How to tell if samba is running?

# ps -aux | grep smb
root 4179 0.0 0.4 6800 3044 ?? Ss 6:44AM 0:00.03 /usr/local/libexec/smbd -D
root 3845 0.0 0.2 6800 1772 ?? I 6:44AM 0:00.00 /usr/local/libexec/smbd -D
kz 29574 0.0 0.5 7016 4224 ?? S 6:45AM 0:00.10 /usr/local/libexec/smbd -D
nobody 19034 0.0 0.5 6824 3612 ?? S 7:15AM 0:00.40 /usr/local/libexec/smbd -D

You will see that samba forked a new user process for processing the request.

About these ads
Categories: BSD
  1. ยังไม่มีความเห็น
  1. No trackbacks yet.

ใส่ความเห็น

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / เปลี่ยนแปลง )

Twitter picture

You are commenting using your Twitter account. Log Out / เปลี่ยนแปลง )

Facebook photo

You are commenting using your Facebook account. Log Out / เปลี่ยนแปลง )

Google+ photo

You are commenting using your Google+ account. Log Out / เปลี่ยนแปลง )

Connecting to %s

ติดตาม

Get every new post delivered to your Inbox.

%d bloggers like this: