« [IPCN] 参加挑战杯 2004-04-24 17:00 综体西网球 |
Main
| pptpd PoPToP ppp - a simple sample of vpn »
April 25, 2004
SMB 网上邻居 网邻 samba@linux net@windows
版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。
https://windtear.net/archives/2004/04/25/000402.html
-----> samba - linux smb server % cat smb.conf [global] netbios name = windtear workgroup = WORKGROUP server string = linux smb server #socket address = 10.35.0.253 #hosts allow = 127. 10.35. #hosts deny = all #inherit permissions = yes create mask = 0664 directory mask = 0775 log file = /var/log/samba/log.%I max log size = 50 password level = 8 encrypt passwords = yes smb passwd file = /etc/samba/smbpasswd socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 dns proxy = no
[homes] comment = Home Directories path = /home/%u browseable = no writable = yes
[_ROOT_] comment = _ROOT_ path = / guest ok = No read only = No browseable = No valid users = root write list = root
-----> windows client % net use X: "\\172.16.162.105\DIR" password /USER:user % net use X: /DELETE
% net use \\172.16.162.105\ipc$ /delete \\172.16.162.105\ipc$ 已经删除。
%
-----> smb init.d no NMBD #!/bin/sh # # chkconfig: - 91 35 # description: Starts and stops the Samba smbd daemons \ # used to provide SMB network services. # # pidfile: /var/cache/samba/smbd.pid # config: /etc/samba/smb.conf
# Source function library. if [ -f /etc/init.d/functions ] ; then . /etc/init.d/functions elif [ -f /etc/rc.d/init.d/functions ] ; then . /etc/rc.d/init.d/functions else exit 0 fi
# Avoid using root's TMPDIR unset TMPDIR
# Source networking configuration. . /etc/sysconfig/network
if [ -f /etc/sysconfig/samba ]; then . /etc/sysconfig/samba fi
# Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0
# Check that smb.conf exists. [ -f /etc/samba/smb.conf ] || exit 0
RETVAL=0
start() { KIND="SMB" echo -n $"Starting $KIND services: " daemon smbd $SMBDOPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/smb || \ RETVAL=1 return $RETVAL }
stop() { KIND="SMB" echo -n $"Shutting down $KIND services: " killproc smbd RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/smb echo "" return $RETVAL }
restart() { stop start }
reload() { echo -n $"Reloading smb.conf file: " killproc smbd -HUP RETVAL=$? echo return $RETVAL }
rhstatus() { status smbd }
case "$1" in start) start ;; stop) stop ;; restart) restart ;; reload) reload ;; status) rhstatus ;; condrestart) [ -f /var/lock/subsys/smb ] && restart || : ;
|
|
Posted by windtear at April 25, 2004 4:17 PM