首页 > 代码库 > Samba: Server setup..

Samba: Server setup..

2 days passed, and I finally find it done with samba server.. with utube

to set up a samba server:

1. install samba;

2. add /etc/samba/smb.conf to the tail:

[wwt]  # This is the shared folder name displayed in the guest
    path = /home/wwt # This is the dest folder in the host
    available = yes
    valid users = wwt root # space seperated
    writable = yes
    write list = wwt # users guaranteed to write the folder
    browseable = yes
    public = yes
    workgroup = ADMIN # This line is for windows users to login, no use in linux

3. chcon -t samba_share_t /home/wwt -R

to make all the folder/file be samba_shared.

4. add samba user wwt/root [ the mentioned user wwt in the smb.conf]:

smbpasswd -a wwt
smbpasswd -a root

In linux guest:

smbclient -L 10.0.5.2
smbclient \\\\10.0.5.2\\wwt password

In windows guest:

win-r<CR>
\\10.0.5.2

 

the test finished.

but if want to put into real work circumstances.. we need yum install cifs-utils:

# first install the mount.cifs tool
mount.cifs //10.0.5.2/wwt /mnt/wwt -o user=wwt
# input the password
cd /mnt/wwt
# done..

 

Samba: Server setup..