Posted on 2011-06-17 11:18
幻海藍(lán)夢 閱讀(1452)
評論(0) 編輯 收藏 所屬分類:
Linux
[root@localhost kiki]# cd /etc/samba/
[root@localhost samba]# ls -al
總計 156
drwxr-xr-x 2 root root 4096 06-16 17:33 .
drwxr-xr-x 103 root root 12288 06-16 15:30 ..
-rw-r--r-- 1 root root 20 2008-11-27 lmhosts
-rw-r--r-- 1 root root 231 06-16 17:31 smb.conf
-rw-r--r-- 1 root root 9781 05-26 17:34 smb.conf.bak
-rw-r--r-- 1 root root 9898 06-16 14:04 smb.conf.h
-rw-r--r-- 1 root root 9902 06-16 13:19 smb.conf.hcz
-rw-r--r-- 1 root root 16384 06-16 13:32 .smb.conf.hcz.swp
-rw-r--r-- 1 root root 9845 06-16 13:24 smb.conf.hzc
-rw-r--r-- 1 root root 291 06-16 14:36 smb.conf.n
-rw-r--r-- 1 root root 9894 06-16 10:44 smb.conf.ok
-rw-r--r-- 1 root root 97 2008-11-27 smbusers
[root@localhost samba]#
[root@localhost samba]# cat smb.conf
[global]
workgroup = LinuxSir
netbios name = kiki_fedora
server string = kiki_fedora
security = user
[work]
path = /home/dsl
writable = yes
browseable = yes
guest ok = yes
[root@localhost samba]#
[root@localhost samba]#
[root@localhost samba]#
[root@localhost samba]# /etc/rc.d/init.d/sm
smartd smb smolt
[root@localhost samba]# /etc/rc.d/init.d/smb restart
關(guān)閉 SMB 服務(wù): [確定]
啟動 SMB 服務(wù): [確定]
[root@localhost samba]#
[root@localhost samba]# smbpasswd -a root
想在我的fedora機(jī)器:172.28.6.36上面搭建samba,實現(xiàn)我本機(jī)windows機(jī)器:172.28.6.27之間的文件共享,
問題:始終在windows訪問時提示無權(quán)限,
解決方法:1. 首先要把fedora機(jī)器上的ifconfig命令和samba服務(wù)都開啟來,
2. 在fedora機(jī)器上按照上面所示的命令進(jìn)行設(shè)置samba,并創(chuàng)建samba賬戶,root/xxxxxxx;kiki/xxxxxx;并且查看進(jìn)行共享的文件屬性是root還是kiki.
3. 最關(guān)鍵的一個問題:SELINUX導(dǎo)致無權(quán)限訪問,setenforce=0停掉selinux搞定。
3.