Solaris10¤Çsamba¤Èswat¤ÎÀßÄê¤ò¤¹¤ë¤Ë¤Ï
¤³¤³¤Ç¤Ï¡¢Windows¤È¥Õ¥¡¥¤¥ë¶¦Í¤Ê¤É¤ÇÏ¢·È¤¹¤ë¤¿¤á¤Ë samba ¤ÎÀßÄêÊýË¡¤ò¾Ò²ð¤¹¤ë¡£
samba¼«ÂÎ¤Ï Solaris 9 ¤Ç¤â¥Ð¥ó¥É¥ë¤µ¤ì¤Æ¤¤¤ë¤·¡¢¥Õ¥ê¡¼¥¦¥§¥¢¤Ê¤Î¤Ç¤É¤³¤«¤é¤Ç¤âÆþ¼ê¤Ç¤¤ë¤¬¡¢¤»¤Ã¤«¤¯¤Ê¤Î¤Ç Solaris
10 ¤Ë¥Ð¥ó¥É¥ë¤µ¤ì¤Æ¤¤¤ë¤â¤Î¤ÇÀßÄꤷ¤Æ¤ß¤ë¡£
¥×¥í¥°¥é¥àËÜÂΤÏ/usr/sfw/sbin °Ê²¼¤Ë¤¢¤ë smbd ¤À¡£
bash-3.00#
cd /usr/sfw/sbin
bash-3.00#
ls
bgpdstart
nmbd
ripdstop
smbd
tcpd zebraadm
bgpdstop ospfdstart
safe_finger snmpd
tcpdchk
mysqld ospfdstop
ser
snmptrapd tcpdmatch
mysqld_safe ripdstart
serctl
swat try-from
Solaris 10 3/05 ÈǤΥǥե©¥ë¥È¤Î¥Ð¡¼¥¸¥ç¥ó¤Ï 3.0.4 ¤À¤¬¡¢¥Ñ¥Ã¥Á
119757-01
¤òŬÍѤ¹¤ë¤³¤È¤Ç 3.0.11 ¤Ë¤Ê¤ë¡£
bash-3.00#
./smbd -V
Version 3.0.11
¢£ smb.conf ¥Õ¥¡¥¤¥ë¤ÎºîÀ®
¥Æ¥ó¥×¥ì¡¼¥È¤Ï /etc/sfw/smb.conf-example ¤Ê¤Î¤Ç¤³¤ì¤ò¥³¥Ô¡¼¤·¤Æ»ÈÍѤ¹¤ë¡£
bash-3.00#
cd /etc/sfw
bash-3.00#
ls
a2ps-site.cfg
mysql
ser
a2ps.cfg
openssl
smb.conf-example
foomatic
private
zebra
bash-3.00#
cp smb.conf-example
smb.conf
¤Û¤È¤ó¤É¥Ç¥Õ¥©¥ë¥È¤Î¤Þ¤Þ¤À¤¬¡¢PC¤Î´Ä¶¤Ê¤É¤Ëworkgroup¤Ê¤É¤ò¹ç¤ï¤»¤ë¤Ê¤É¤ÎÊѹ¹¤ò²Ã¤¨¤¿¡£¡ÊÂÀ»ú¤ÎÉôʬ¤¬Êѹ¹ÅÀ¡Ë
bash-3.00#
cat smb.conf
#======================= Global Settings========================
[global]
workgroup = WORKGROUP
server string = Samba Server
security = user
hosts allow = 192.168.1.
127.
load printers = no
; printcap name = /etc/printcap
; printcap name = lpstat
; printing = cups
; guest account = pcguest
log file =
/var/samba/log.%m
max log size = 50
; password server = <NT-Server-Name>
; realm = MY_REALM
; passdb backend = tdbsam
; include = /usr/sfw/lib/smb.conf.%m
socket options = TCP_NODELAY
; interfaces = 192.168.12.2/24 192.168.13.2/24
; local master = no
; os level = 33
; domain master = yes
; preferred master = yes
; domain logons = yes
; logon script = %m.bat
; logon script = %U.bat
; logon path = \\%L\Profiles\%U
; wins support = yes
; wins server = w.x.y.z
; wins proxy = yes
dns proxy = no
; add user script = /usr/sbin/useradd %u
; add group script = /usr/sbin/groupadd %g
; add machine script = /usr/sbin/adduser -n -g machines -c
Machine -d /dev/null
-s /bin/false %u
; delete user script = /usr/sbin/userdel %u
; delete user from group script = /usr/sbin/deluser %u %g
; delete group script = /usr/sbin/groupdel %g
#============================ Share Definitions ====================
[homes]
comment = Home Directories
browseable = no
writable = yes
path = /export/home/%S
; [netlogon]
; comment = Network Logon Service
; path = /usr/sfw/lib/netlogon
; guest ok = yes
; writable = no
; share modes = no
;[Profiles]
; path = /usr/local/samba/profiles
; browseable = no
; guest ok = yes
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
# Set public = yes to allow user 'guest account' to print
guest ok = no
writable = no
printable = yes
# This one is useful for people to share files
;[tmp]
; comment = Temporary file space
; path = /tmp
; read only = no
; public = yes
;[public]
; comment = Public Stuff
; path = /home/samba
; public = yes
; writable = yes
; printable = no
; write list = @staff
;[fredsprn]
; comment = Fred's Printer
; valid users = fred
; path = /homes/fred
; printer = freds_printer
; public = no
; writable = no
; printable = yes
;[fredsdir]
; comment = Fred's Service
; path = /usr/somewhere/private
; valid users = fred
; public = no
; writable = yes
; printable = no
;[pchome]
; comment = PC Directories
; path = /usr/pc/%m
; public = no
; writable = yes
[public]
path = /export/public
public = yes
only guest = yes
writable = yes
printable = no
[myshare]
comment = for user1
path = /export/shared
valid users = user1
public = no
writable = yes
printable = no
create mask = 0765
bash-3.00#
¤³¤ì¤Ç¤È¤ê¤¢¤¨¤º samba ¤òµ¯Æ°¤·¤Æ¤ß¤ë¡£
bash-3.00#
/etc/init.d/samba start
smbd ¤È nmbd ¤¬Æ°ºî¤·¤Æ¤¤¤ì¤ÐÀµ¾ï¤À¡£
/etc/rc3.d/S90samba ¤¬¤¢¤ë¤Î¤ÇºÆµ¯Æ°»þ¤â smb.conf ¤Îµ½Ò¤Ë¸í¤ê¤¬¤Ê¤±¤ì¤Ð¼«Æ°Åª¤Ëµ¯Æ°¤¹¤ë¡£
¤Þ¤¿¡¢¥¢¥¯¥»¥¹¤¹¤ë¤¿¤á¤Ë°Ê²¼¤Î¤è¤¦¤Ë¥æ¡¼¥¶¡¼ user1 ¤òÅÐÏ¿¤¹¤ë¡£
¡Ê user1 ¤Ï¤¢¤é¤«¤¸¤á¥·¥¹¥Æ¥à¤Î¥æ¡¼¥¶¡¼¤È¤·¤Æ /etc/passwd ¥Õ¥¡¥¤¥ë¤ËÅÐÏ¿¤µ¤ì¤Æ¤¤¤ëɬÍפ¬¤¢¤ë¡Ë
bash-3.00#
/usr/sfw/bin/smbpasswd -a
user1
New SMB password:
¥Ñ¥¹¥ï¡¼¥ÉÆþÎÏ
Retype new SMB password:
ºÆÅ٥ѥ¹¥ï¡¼¥ÉÆþÎÏ
Added user user1
¾åµÀßÄê¤Î¸å¡¢ Windows XP ¥Þ¥·¥ó¤«¤é¥¢¥¯¥»¥¹¤·¤Æ¤ß¤¿·ë²Ì¤¬²¼¤Î¥¤¥á¡¼¥¸¤À¡£
¢£ swat ¤ÎÀßÄê
swat ¤òưºî¤µ¤»¤ë¤Ë¤Ï¤Þ¤º¡¢/etc/inet/services ¤Ë°Ê²¼¤Î¥¨¥ó¥È¥ê¤òÄɲ乤롣
bash-3.00#
vi /etc/inet/services
...
swat
901/tcp
¼¡¤Ë /etc/inet/inetd.conf ¤Ë°Ê²¼¤Î¥¨¥ó¥È¥ê¤òÄɲä·¡¢inetconv ¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤·¡¢inetd ·Ðͳ¤Ç swat
¤¬µ¯Æ°¤¹¤ë¤è¤¦¤Ë SMF ¤ËÁȤ߹þ¤à¡£
;·×¤Ê¥µ¡¼¥Ó¥¹¤òÄɲ䷤ʤ¤¤è¤¦¤Ë inetd.conf ¤Ç¤Ï swat °Ê³°¤Î¥¨¥ó¥È¥ê¤òÁ´¤Æ¥³¥á¥ó¥È¥¢¥¦¥È¤·¤Æ¤ª¤¯¤³¤È¤ò´«¤á¤ë¡£
bash-3.00#
vi /etc/inet/inetd.conf
...
swat stream tcp nowait root
/usr/sfw/sbin/swat swat
bash-3.00#
inetconv
swat -> /var/svc/manifest/network/swat-tcp.xml
swat-tcp.xml ¤ò¥¤¥ó¥Ý¡¼¥È¤·¤Æ¤¤¤Þ¤¹ ...´°Î»
¾åµ¤Î inetconv ¥³¥Þ¥ó¥É¤Ç swat ÍѤΥޥ˥ե§¥¹¥È swat-tcp.xml ¤¬ºîÀ®¤µ¤ì SMF
¤Î¥µ¡¼¥Ó¥¹¤È¤·¤ÆÁȤ߹þ¤Þ¤ì¤¿¡£¤È¤¤¤¦¤³¤È¤Ç°Ê²¼¤Î¤è¤¦¤Ê¥³¥Þ¥ó¥É¤Ç¥¹¥Æ¡¼¥¿¥¹¤Î³Îǧ¤¬²Äǽ¤Ë¤Ê¤Ã¤Æ¤¤¤ë¡£
bash-3.00#
svcs swat/tcp
STATE
STIME FMRI
online 16:06:32
svc:/network/swat/tcp:default
bash-3.00#
inetadm | grep swat
enabled
online
svc:/network/swat/tcp:default
bash-3.00#
inetadm -l swat/tcp
SCOPE NAME=VALUE
name="swat"
endpoint_type="stream"
proto="tcp"
isrpc=FALSE
wait=FALSE
exec="/usr/sfw/sbin/swat"
user="root"
default bind_addr=""
default bind_fail_max=-1
default bind_fail_interval=-1
default max_con_rate=-1
default max_copies=-1
default con_rate_offline=-1
default failrate_cnt=40
default failrate_interval=60
default inherit_env=TRUE
default tcp_trace=FALSE
default tcp_wrappers=FALSE
swat ¤òÍøÍѤ¹¤ë¤Ë¤Ï¥Ö¥é¥¦¥¶¤Ç swat ¤¬Æ°ºî¤¹¤ë¥Û¥¹¥È¤Î¥Ý¡¼¥È901È֤˥¢¥¯¥»¥¹¤¹¤ë¡£
swat ¤Ë¤è¤ë¥í¥°¥¤¥ó¤¬Í׵ᤵ¤ì¤ë¤¬¡¢¡Ö¥Õ¥¡¥¤¥ë¶¦Í¡×¤Î¤¿¤á¤Î¥Ñ¥¹¥ï¡¼¥É¤ÎÀßÄê¤ä¡¢¤µ¤Þ¤¶¤Þ¤Ê¥µ¡¼¥Ð¡¼µ¡Ç½¤ÎÊѹ¹¤Ê¤É¤ò¹Ô¤¦¤Ë¤Ï root
¸¢¸Â¤Ç¥í¥°¥¤¥ó¤¹¤ëɬÍפ¬¤¢¤ë¡£
°Ê²¼¤¬¥¢¥¯¥»¥¹¤·¤¿¤È¤¤Î¥¤¥á¡¼¥¸¡£
¡Ú¥¢¥ó¥±¡¼¥È¡Û
¤³¤Îµ»ö¤Ï¤¿¤á¤Ë¤Ê¤ê¤Þ¤·¤¿¤«¡©
¡¡¡¡¡¡¤Ï¤¤¡¡¡¡/¡¡¡¡¤¤¤¤¤¨