ใช้คำสั่ง
- /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 เดิม
- [global]
- security = ads
- realm = SCI.COM
- password server = dc01.sci.com
- workgroup = SCI
- idmap uid = 10000-20000
- idmap gid = 10000-20000
- winbind enum users = yes
- winbind enum groups = yes
- template homedir = /home/%U
- template shell = /bin/bash
- client use spnego = yes
- client ntlmv2 auth = yes
- encrypt passwords = yes
- winbind use default domain = yes
- restrict anonymous = 2
- map acl inherit = yes
- nt acl support = yes
- disable spoolss = yes
- wins server = 192.168.0.253
Code ใหม่ที่แก้ไข
- [global]
- ## Browsing/Identification ###
- workgroup = SCI
- server string = %h server (Samba, Ubuntu)
- ; wins server = w.x.y.z
- #### Networking ####
- dns proxy = no
- ; interfaces = 127.0.0.0/8 eth0
- ; bind interfaces only = yes
- #### Debugging/Accounting ####
- log file = /var/log/samba/log.%m
- max log size = 1000
- syslog = 0
- panic action = /usr/share/samba/panic-action %d
- ####### Authentication #######
- server role = standalone server
- passdb backend = tdbsam
- obey pam restrictions = yes
- unix password sync = yes
- passwd program = /usr/bin/passwd %u
- passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
- pam password change = yes
- map to guest = bad user
- ########## Domains ###########
- ; logon path = \\%N\profiles\%U
- ; logon drive = H:
- ; logon script = logon.cmd
- ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
- ; add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
- ; add group script = /usr/sbin/addgroup --force-badname %g
- ############ Misc ############
- ; include = /home/samba/etc/smb.conf.%m
- ; idmap uid = 10000-20000
- ; idmap gid = 10000-20000
- ; template shell = /bin/bash
- ; usershare max shares = 100
- usershare allow guests = yes
- ############ Edit Winbind Login ###############
- security = ads
- password server = dc01.sci.com
- winbind enum users = yes
- winbind enum groups = yes
- encrypt passwords = yes
- winbind use default domain = yes
- wins server = 192.168.0.253
No comments:
Post a Comment