分类: LINUX
2008-04-25 21:23:40
Once you’ve installed Samba, you should become at least somewhat aware of a few of the tools at your disposal:
* findsmb - list info about machines that respond to SMB name queries on a subnet
* make_unicodemap - construct a unicode map file for Samba
* make_smbcodepage - construct a codepage file for Samba
* nmbd - NetBIOS name server to provide NetBIOS over IP naming services to clients
* nmblookup - NetBIOS over TCP/IP client used to lookup NetBIOS names
* rpcclient - Tool for executing client side MS-RPC functions
* smbcacls - Set or get ACLs on an NT file or directory names
* smbclient - ftp-like client to access SMB/CIFS resources on servers
* smbcontrol - Send messages to smbd, nmbd or winbindd processes
* smbd - Server to provide SMB/CIFS services to clients
* smbmnt - Helper utility for mounting SMB filesystems
* smbmount - Mount an smbfs filesystem
* smbpasswd - Change or create a user’s SMB password
* smbspool - Send a print file to an SMB printer
* smbstatus - Report on current Samba connections
* smbtar - Shell script for backing up SMB/CIFS shares directly to UNIX tape drives
* testparm - Check an smb.conf configuration file’s syntax
* testprns - Check printer name for validity with smbd
* wbinfo - Query information from winbind daemon
* winbindd - Name Service Switch daemon for resolving names from NT servers
If you really just want to restart Samba (thus having it re-read its configuration files), you can just send a SIGHUP signal:
# killall -HUP smbd nmbd修改了samba的配置文件:/etc/samba/smb.conf
# This is /etc/samba/smb.conf这个文件里的内容可以用testparm显示。
[global]
guest account = smbguest
log file = /var/log/samba.log
log level = 1
netbios name = FLUFFYGERBIL //////been changed
security = share
socket options = TCP_NODELAY IPTOS_LOWDELAY
workgroup = WORKGROUP //////been changed
[public] //////been changed
guest ok = yes
guest only = yes
path = /tmp //////been changed
read only = no
[cdrom] /////been deleted
fake oplocks = yes
guest ok = yes
guest only = yes
path = /mnt/cdrom
read only = yes
Next, we’ll need to set up a generic guest account in the system itself. While the commands can be somewhat system dependent, you can typically do this with something similar to:
# groupadd smbguest
# useradd -g smbguest -d /dev/null -s /bin/false smbguest
# killall -HUP smbd nmbd
以便使其生效。
之后的问题就是,在path中提供的目录的权限问题,如果权限设置不恰当,也是没有办法访问的。
比较奇怪的是,有一个组为root的文件夹及里面的文件是可以访问的。而组为users的不行。