亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 2482 | 回復: 6
打印 上一主題 下一主題

samba配置問題 [復制鏈接]

論壇徽章:
0
跳轉到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2012-04-20 16:26 |只看該作者 |倒序瀏覽
本帖最后由 anonymous0502 于 2012-04-20 16:26 編輯

/etc/samba/smb.conf文件如下:

[global]
        workgroup = MYGROUP
        server string = Samba Server Version %v
    netbios name = smbtestserver
        log file = /var/log/samba/%m.log
        max log size = 5000
        security = user
    encrypt passwords = yes
    smb passwd file = /etc/samba/smbpasswd
    dns proxy = no
    name resolve order = lmhosts bcast host
        load printers = yes
        cups options = raw
idmap uid = 1000000-2000000
idmap gid = 1000000-2000000
template shell = /bin/false
winbind use default domain = no
[smbshare]
    comment = test share
    path = /sambashare
    read only = no
    public = yes
    writable = yes
    valid users = apple
    create mode =0664
    directory mode = 0775

testparm看到的結果總是不對,security = user的設置總是無效,為什么?

[root@server501 ~]# testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[smbshare]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
        workgroup = MYGROUP
        netbios name = SMBTESTSERVER
        server string = Samba Server Version %v
        log file = /var/log/samba/%m.log
        name resolve order = lmhosts bcast host
        dns proxy = No
        idmap uid = 1000000-2000000
        idmap gid = 1000000-2000000
        cups options = raw

[smbshare]
        comment = test share
        path = /sambashare
        valid users = apple
        read only = No
        create mask = 0664
        directory mask = 0775
        guest ok = Yes

論壇徽章:
0
2 [報告]
發(fā)表于 2012-04-20 18:21 |只看該作者
請問LZ,你這個配置是不是原配?木有改過???

論壇徽章:
0
3 [報告]
發(fā)表于 2012-04-20 19:06 |只看該作者
13466852695 發(fā)表于 2012-04-20 18:21
請問LZ,你這個配置是不是原配?木有改過???

謝謝,有點眉目了,以前記的在rhel4上做的筆記寫得不清不楚,自己折騰了一陣心里有點數(shù)了,但是仍然有其他疑問,還得繼續(xù)google一陣{:2_166:}

論壇徽章:
0
4 [報告]
發(fā)表于 2012-04-20 19:32 |只看該作者
本帖最后由 anonymous0502 于 2012-04-20 19:36 編輯

以前從沒注意到這個地方:
為什么smb.conf設置了security = user,但是smbclient -L時還是不需要用戶和口令就可以查看到部分信息呢?
在windows上是會彈出對話框要求輸入用戶和口令了的
這個本來就是這么設計的?
  1. [apple@server501 ~]$ smbclient -L //server501
  2. Password:
  3. [b]Anonymous login successful[/b]
  4. Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.0.28-0.el5.8]

  5.         Sharename       Type      Comment
  6.         ---------       ----      -------
  7.         IPC$            IPC       IPC Service (Samba Server Version 3.0.28-0.el5.8)
  8. Anonymous login successful
  9. Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.0.28-0.el5.8]

  10.         Server               Comment
  11.         ---------            -------
  12.         SERVER501            Samba Server Version 3.0.28-0.el5.8

  13.         Workgroup            Master
  14.         ---------            -------
  15.         MYGROUP              SERVER501
復制代碼

論壇徽章:
0
5 [報告]
發(fā)表于 2012-04-20 19:42 |只看該作者
這好像本來就是這樣子的{:2_166:}
我已經(jīng)把samba-common重新安裝過了,用的--replacepkgs,被我改動過的文件已經(jīng)被我移位了。rpm -V已經(jīng)顯示復原如初了。
只是這個結果跟我以前想的有點不同

[root@server501 samba]# rpm -qf /etc/samba/smb.conf
samba-common-3.0.28-0.el5.8
[root@server501 samba]# rpm -V samba-common
[root@server501 samba]# grep -v -E '^\s*#|^\s*;|^\s*$' smb.conf
[global]
        workgroup = MYGROUP
        server string = Samba Server Version %v
        security = user
        passdb backend = tdbsam
        load printers = yes
        cups options = raw
[homes]
        comment = Home Directories
        browseable = no
        writable = yes
[printers]
        comment = All Printers
        path = /var/spool/samba
        browseable = no
        guest ok = no
        writable = no
        printable = yes
[root@server501 samba]# testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[printers]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
        workgroup = MYGROUP
        server string = Samba Server Version %v
        passdb backend = tdbsam
        cups options = raw

[homes]
        comment = Home Directories
        read only = No
        browseable = No

[printers]
        comment = All Printers
        path = /var/spool/samba
        printable = Yes
        browseable = No
[root@server501 samba]#


論壇徽章:
13
15-16賽季CBA聯(lián)賽之同曦
日期:2016-01-28 19:52:032015亞冠之北京國安
日期:2015-10-07 14:28:19NBA常規(guī)賽紀念章
日期:2015-05-04 22:32:03處女座
日期:2015-01-15 19:45:44卯兔
日期:2014-10-28 16:17:14白羊座
日期:2014-05-24 15:10:46寅虎
日期:2014-05-10 09:50:35白羊座
日期:2014-03-12 20:52:17午馬
日期:2014-03-01 08:37:27射手座
日期:2014-02-19 19:26:54子鼠
日期:2013-11-30 09:03:56獅子座
日期:2013-09-08 08:37:52
6 [報告]
發(fā)表于 2012-05-26 15:06 |只看該作者

  1. 以前的筆記供您參考!

  2. > cat samba.txt
  3. # Samba
  4. # CIFS(Common Internet File System)
  5. # NetBIOS(Network Basic Input/Output System)
  6. /etc/samba/smb.conf
  7. /etc/samba/smbpasswd
  8. /etc/samba/smbusers

  9. /usr/bin/testparm
  10. /usr/bin/smbstatus
  11. /usr/bin/smbpasswd
  12. /usr/bin/smbclient
  13. /usr/bin/nmblookup
  14. /usr/bin/smbtree
  15. nmbd        (UDP:137,138port)
  16. smbd        (TCP:139,445port)
  17. samba samba-common samba-client
  18. chkconfig smb on
  19. service smb restart
  20. # ATTENTION: the 'security context' should be changed as follow ~!Oops..
  21. chcon -Rvt samba_share_t /shared/

  22. dumpe2fs -h /dev/sda5
  23. vim /etc/fstab
  24. LABEL=/1 ext3 defaults,acl 1 1
  25. mount -o remount,acl /
  26. # 1>: Group Control
  27. setfacl -m d:g:groupname:rwx /shared
  28. getfacl /shared
  29. mask+actual permission = effective permission
  30. # 2>: User Control
  31. chown jacky:jacky /shared        (Control only one user)

  32. smbpasswd -a jacky
  33. cat /etc/samba/smbpasswd
  34. smbpasswd -d jacky
  35. smbpasswd -e jacky

  36. smbclient //192.168.0.12/shared -U jacky
  37. smbclient -L //127.0.0.1 -U user%password
  38. mount -t cifs //station12/shared /mnt -o username=jacky,password=jacky
  39. # AutoMounter for Samba
  40. chkconfig autofs on
  41. service autofs restart
  42. vim /etc/auto.master
  43. /home        /etc/auto.samba        --timeout=60
  44. cp /etc/auto.misc /etc/auto.samba
  45. vim /etc/auto.samba
  46. samba        -fstype=cifs,username=?,password=?        ://192.168.1.4/shared

  47. # User Home's Access Control
  48. getsebool -a | grep samba
  49. setsebool -P samba_enable_home_dirs=1
  50. service smb restart

  51. cat /etc/sysconfig/i18n
  52. LANG="en_US.UTF-8"
復制代碼

論壇徽章:
3
IT運維版塊每日發(fā)帖之星
日期:2015-12-22 06:20:00操作系統(tǒng)版塊每日發(fā)帖之星
日期:2016-01-19 06:20:00每日論壇發(fā)貼之星
日期:2016-01-19 06:20:00
7 [報告]
發(fā)表于 2013-03-15 08:34 |只看該作者
linux samba服務器驗證的時候windows卻之用guest去登陸,這是不是linux那配置錯了,還是windows問題。

  



您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復

  

北京盛拓優(yōu)訊信息技術有限公司. 版權所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關心和支持過ChinaUnix的朋友們 轉載本站內容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP