close

1) open fireware port

$ sudo vi /etc/sysconfig/iptable    -> add 137 138 139

$ /etc/init.d/iptables restart

 

2)  sudo vi /etc/samba/smb.conf  //using GUI would be convinent

workgroup = linux

netbios name = linux_share

host allow = 127.  192.168.10 192.168.0   //allowed computer

security = share

[share_folder]

writable = yes

valid user = %s

browseable = yes

 

$ sudo pdbedit -a -u share_user_name

$ /etc/init.d/smb restart

 

//--------

GUI-> System -> Administration -> Server Setting -> Samba -> Preferences -> Security -> Authentication Mode (Share) / Guest Account (share_user_name)

GUI-> System -> Administration -> Server Setting -> Samba -> Preferences -> Samba Users

                           

3) $sudo setbool -P samba_export_all_rw 1            //p.s. It's dangeous !!! Use this only if want to share home folder

 

4) start samb deamon when power on

$ sudo /usr/sbin/ntsysv

 

5) test samba connection

linux -> $ smbclient -L //127.0.0.14) 

xp    -> search -> computer   :192.168.xxx.xxx

 

====================================================================================================

Samba mount  the folders shared by XP 

$ sudo mkdir /mnt/xp_share

$ sudo vi /etc/fstab 

//192.168.xxx.xxx/(folder_name)   /mnt/xp_share cifs guest,_netdev,uid=500,gid=500 0 0 

$ sudo mount -a   //test if fstab is ok

 

Samba mount the folders shared by Linux

$ smbclient -L  //192.168.xxx.xxx                        // check folder name, it shows as the following

 

Sharename       Type      Comment
        ---------       ----      -------
        homes           Disk      Home Directories
        share_folder Disk                                                    
        IPC$            IPC       IPC Service (Samba Server Version 3.0.33-3.29.

 

$ sudo mkdir /mnt/tmp

$ sudo mount //192.168.xxx.xxx/share_folder   /mnt/tmp

 

 

 

 

 

 

 

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 阿肯 的頭像
    阿肯

    韌體開發筆記

    阿肯 發表在 痞客邦 留言(0) 人氣()