Profile / etc / samba /
// Set the Samba password file
# cat /etc/passwd|mksmbpasswd.sh> / etc / samba / smbpasswd
/ / To set up files and directories
# chown root.root / etc / samba / smbpasswd
# chmod 500 / etc / samba
# chmod 600 / etc / samba / smbpasswd
/ / Set the password for the user
#smbpasswd root
/ / Check the correctness of the configuration file
# TestParm
/ / Check the resources shared by the server
# SMBCLIENT -L Localhost
// list resource usage
# SMBSTATUS [-B]
// Profile
Section:
l [global] define global parameters and default values
l [homes] Defines the user's Home Directory Sharing
l [Printers] Defines the printer sharing
l [userDefined_sharename] User Custom Sharing (Multiple)
variable:
L% S Current service name
L% P The root path of the current service
L% u Current service username
L% g gives a given% U of the working group name
L% h gives a host directory of% U
L% v samba version number
L% h runs the host name
L% NETBIOS name
L% l server NetBIOS name
L% l Current date and time
// Use symbolic link to organize local shared resources
# vi /etc/samba/smb.conf
[Resource]
Comment = local resource
Path = / var / samba / resource
Public = yes
Writeable = yes
// -p parent (no error if existing, make parent directories as needed)
# MKDIR -P / VAR / Samba / Resource
#CD / VAR / Samba / Resource
// - s, --ssymbolic
# ln -s / usr / share / doc doc
/ / Configure read-only sharing and reading and sharing for all users
# vi /etc/samba/smb.conf
[TMP]
Comment = Temporary File Space
Path = / TEM
Read only = no
Public = yes
[CDROM]
Comment = CDROM
Path = / mNT / CDROM
oud all = yes
Public = yes
/ / Sharing for the specified user or group configuration
# UserAdd Samba
# Passwd Samba
# MKDIR / VAR / Samba / Samba
/ / Change the owner of the directory
# chown samba.samba / var / samba / samba
# vi smb.conf
[sambadir]
Comment = Samba's Service
Path = / var / samba / samba
Valid users = Samba
Public = no
Writable = yes
//Save changes
// Linux Environment Access Samba Share
# cat / etc / samba / lmhosts
# SMBCLIENT -L IP -U User Name