yum install -y samba samba-client

 vim /etc/samba/smb.conf


  workgroup = WORKGROUP


 security = share


[share]

        comment = share all

        path = /tmp/samba

        browseable = yes

        public = yes

        writable = no

mkdir /tmp/samba

 chmod 777 /tmp/samba/

 echo "dfahfak" > /tmp/samba/sharefiles

/etc/init.d/smb start

testparm

file://192.168.1.112/share/sharefiles




 security = user

[myshare]

        comment = share for users

        path = /samba

        browseable = yes

        writable = yes

        public = no

 mkdir /samba

chmod 777 /samba/

useradd user1

 useradd user2


 pdbedit -a user1

 pdbedit -a user2


 pdbedit -L

file://IP/myshare/

smbclient //IP/共享名 -U 用户名


pdbedit -x username //删除Samba账户。

pdbedit -Lv //列出Samba用户列表详细信息。

pdbedit -c “[D]” -u username //暂停该Samba用户账号

pdbedit -c “[]” -u username //恢复该Samba用户账号。