Difference between revisions of "Samba4 Troubleshooting"

From Stadm
Jump to navigationJump to search
 
(4 intermediate revisions by the same user not shown)
Line 5: Line 5:
  
 
=Troubleshooting=
 
=Troubleshooting=
 +
 +
==Update Samba==
 +
*When updating Samba you should only be doing a version change on one DC at a time. Then verify that the DC is working in the domain before upgrading other DCs, don't update more than one DC at a time, have proper backups!
 +
*https://wiki.samba.org/index.php/Updating_Samba
 +
*Stop service and make backup
 +
systemctl stop samba
 +
/usr/local/samba/bin/samba_backup
 +
*Get samba, configure and install
 +
wget http://www.samba.org/samba/ftp/stable/samba-4.3.3.tar.gz
 +
tar -zxvf samba-4.3.3.tar.gz
 +
cd ~/samba-4.3.3
 +
./configure --enable-debug --enable-selftest --with-ads --with-systemd --with-winbind
 +
*Make sure configure completes successfully, be sure you have proper backups!!!
 +
*Read the release notes to check compatibility.
 +
make
 +
make install
 +
*start the samba service
 +
systemctl start samba
 +
*Go check the logs and verify the system came up correctly:
 +
tail /usr/local/samba/var/$LOGNAME.log
 +
*Test around and see that replication is still in sync. Check that other DCs logs for errors about upgraded DC or replication.
 +
 
==Checking Replication==
 
==Checking Replication==
 
*Check replication status  
 
*Check replication status  
 
  samba-tool drs showrepl
 
  samba-tool drs showrepl
 +
*Force a repl:
 +
*https://wiki.samba.org/index.php/Samba-tool_drs_replicate
  
 
==Force Removal of DC==
 
==Force Removal of DC==
Line 29: Line 53:
 
==Backup and Restore==
 
==Backup and Restore==
 
*https://wiki.samba.org/index.php/Backup_and_restore_an_Samba_AD_DC
 
*https://wiki.samba.org/index.php/Backup_and_restore_an_Samba_AD_DC
 +
 +
==Local Intranet Settings for Roaming Profiles==
 +
*http://www.technipages.com/fix-we-cant-verify-who-created-this-file-error
 +
*https://deployhappiness.com/managing-internet-explorer-trusted-sites-with-group-policy/
  
 
==LDB Search/Edit==
 
==LDB Search/Edit==

Latest revision as of 16:12, 5 February 2016


Troubleshooting

Update Samba

  • When updating Samba you should only be doing a version change on one DC at a time. Then verify that the DC is working in the domain before upgrading other DCs, don't update more than one DC at a time, have proper backups!
  • https://wiki.samba.org/index.php/Updating_Samba
  • Stop service and make backup
systemctl stop samba
/usr/local/samba/bin/samba_backup
  • Get samba, configure and install
wget http://www.samba.org/samba/ftp/stable/samba-4.3.3.tar.gz
tar -zxvf samba-4.3.3.tar.gz
cd ~/samba-4.3.3
./configure --enable-debug --enable-selftest --with-ads --with-systemd --with-winbind
  • Make sure configure completes successfully, be sure you have proper backups!!!
  • Read the release notes to check compatibility.
make
make install
  • start the samba service
systemctl start samba
  • Go check the logs and verify the system came up correctly:
tail /usr/local/samba/var/$LOGNAME.log
  • Test around and see that replication is still in sync. Check that other DCs logs for errors about upgraded DC or replication.

Checking Replication

  • Check replication status
samba-tool drs showrepl

Force Removal of DC

Demote a DC

Join a DC

Backup and Restore

Local Intranet Settings for Roaming Profiles

LDB Search/Edit

  • ldb search example:
ldbsearch -H /usr/local/samba/private/sam.ldb.d/DC\=DOMAINDNSZONES\,DC\=***\,DC\=***\,DC\=***\,DC\=***.ldb
  • weird error with tombstone lifetime
[2015/05/20 14:27:27.377734,  0] ../source4/dsdb/repl/replicated_objects.c:783(dsdb_replicated_objects_commit)
 Failed to apply records: replmd_replicated_apply_add: error during DRS repl ADD: No objectClass found in replPropertyMetaData for DC=lluvia\0ACNF:fe4415b8-8a9d-417d-abb3-77771ec99f88\0ADEL:fe4415b8-8a9d-417d-abb3-77771ec99f88,CN=Deleted Objects,DC=DomainDnsZones,DC=***,DC=***,DC=***,DC=edu!
 : Object class violation
  • use ldbedit to change the tombstone lifetime from 6 months to 10 days to get rid of all extra "Deleted Objects" that wont replicate
ldbedit -H ldap://localhost -Uadministrator -s base -b "CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration,DC=***,DC=***,DC=***,DC=***"