10/31/2017

Ubuntu : Ubuntu Server 16.04 Install Samba Check Status ไม่แสดงชื่อ User ที่เข้ามาใช้งาน มีสีแดงขึ้นแทน

Ubuntu : Ubuntu Server 16.04 Install Samba Check Status ไม่แสดงชื่อ User ที่เข้ามาใช้งาน มีสีแดงขึ้นแทน
ใช้คำสั่ง
  1. /etc/init.d/smbd status
Oct 11 15:57:13 datacenter1 smbd[4894]: [2017/10/11 15:57:13.044034, 0] ../lib/util/become_daemon.c:124(daemon_ready)
Oct 11 15:57:13 datacenter1 smbd[4894]: STATUS=daemon 'smbd' finished starting up and ready to serve connections

แต่ถ้าใช้ไฟล์ smb.conf ของเดิมที่ติดตั้งมากับ samba จะไม่ Error

จึงแก้ไขไฟล์ smb.conf ใหม่ ใช้ตัวอย่างจากไฟล์เดิม แล้วเอา Code เดิม Winbind เพื่อใช้งาน AD
Code เดิม
  1.  
  2. [global]
  3. security = ads
  4. realm = SCI.COM
  5. password server = dc01.sci.com
  6. workgroup = SCI
  7. idmap uid = 10000-20000
  8. idmap gid = 10000-20000
  9. winbind enum users = yes
  10. winbind enum groups = yes
  11. template homedir = /home/%U
  12. template shell = /bin/bash
  13. client use spnego = yes
  14. client ntlmv2 auth = yes
  15. encrypt passwords = yes
  16. winbind use default domain = yes
  17. restrict anonymous = 2
  18. map acl inherit = yes
  19. nt acl support = yes
  20. disable spoolss = yes
  21. wins server = 192.168.0.253
  22.  


Code ใหม่ที่แก้ไข
  1.  
  2. [global]
  3. ## Browsing/Identification ###
  4. workgroup = SCI
  5. server string = %h server (Samba, Ubuntu)
  6. ;   wins server = w.x.y.z
  7.  
  8. #### Networking ####
  9. dns proxy = no
  10. ;   interfaces = 127.0.0.0/8 eth0
  11. ;   bind interfaces only = yes
  12.  
  13. #### Debugging/Accounting ####
  14.    log file = /var/log/samba/log.%m
  15.    max log size = 1000
  16.    syslog = 0
  17.    panic action = /usr/share/samba/panic-action %d
  18.  
  19. ####### Authentication #######
  20.    server role = standalone server
  21.    passdb backend = tdbsam
  22.  
  23.    obey pam restrictions = yes
  24.    unix password sync = yes
  25.    passwd program = /usr/bin/passwd %u
  26.    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
  27.    pam password change = yes
  28.    map to guest = bad user
  29.  
  30. ########## Domains ###########
  31. ;   logon path = \\%N\profiles\%U
  32. ;   logon drive = H:
  33. ;   logon script = logon.cmd
  34. ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
  35. ; add machine script  = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
  36. ; add group script = /usr/sbin/addgroup --force-badname %g
  37.  
  38. ############ Misc ############
  39. ;   include = /home/samba/etc/smb.conf.%m
  40. ;   idmap uid = 10000-20000
  41. ;   idmap gid = 10000-20000
  42. ;   template shell = /bin/bash
  43. ;   usershare max shares = 100
  44.    usershare allow guests = yes
  45.  
  46. ############ Edit Winbind Login ###############
  47. security = ads
  48. password server = dc01.sci.com
  49. winbind enum users = yes
  50. winbind enum groups = yes
  51. encrypt passwords = yes
  52. winbind use default domain = yes
  53. wins server = 192.168.0.253
  54.  


No comments:

Post a Comment