Giter VIP home page Giter VIP logo

tis-sysvolsync's People

Contributors

htouvet avatar ssamson-tis avatar yalemu-tis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tis-sysvolsync's Issues

Hard coded paths

You appear to have hard coded paths to sysvol and sam.ldb, they will not be where the script thinks they are, if Samba is compiled with the defaults.

sysvolsync.py configure fails on Debian 11

I followed the guide at https://samba.tranquil.it/doc/fr/samba_advanced_methods/samba_tis_sysvolsync.html to get tis-sysvolsync working on Debian 11.

More specifically, I ran:

sudo apt-get install git python3-requests python3-lxml python3-ldap procps ldb-tools # I obviously had to install the Python 3 packages
git clone https://github.com/tranquilit/tis-sysvolsync
cd tis-sysvolsync/deb
sh createdeb.sh
sudo dpkg -i tis-sysvolsync-1.20.4.deb
sudo systemctl restart tis-sysvolsync.service
sudo systemctl restart tis-sysvolacl.service
sudo /opt/tis-sysvolsync/sysvolsync.py configure

When running the last command, I get the following errors:

2023-03-08 20:59:22,130 INFO ID : SAF4TGP-RAASEMZ-JCYHRWR-ER4G2V4-2WGVTGN-XOVSZ4T-SARXPBP-RLGWCQK
2023-03-08 20:59:22,130 INFO api port : 8385
2023-03-08 20:59:22,130 INFO api key : uq6PEGvoBLjFQgSUhGkCJdq9RJrjOLwN3/V6XXkY9T
2023-03-08 20:59:22,130 INFO data port : 22001
{'Forest': 'mondomaine.lan', 'Domain': 'mondomaine.lan', 'Netbios domain': 'MONDOMAINE', 'DC name': 'debian-dc1.mondomaine.lan', 'DC netbios name': 'DEBIAN-DC1', 'Server site': 'Default-First-Site-Name', 'Client site': 'Default-First-Site-Name'}
Get DRS connections informations from local LDB AD database...
Configuring sync from DEBIAN-DC2 to DEBIAN-DC1
Remote host infos : {'Forest': 'mondomaine.lan', 'Domain': 'mondomaine.lan', 'Netbios domain': 'MONDOMAINE', 'DC name': 'debian-dc2.mondomaine.lan', 'DC netbios name': 'DEBIAN-DC2', 'Server site': 'Default-First-Site-Name', 'Client site': 'Default-First-Site-Name'}
Connecting to debian-dc2.mondomaine.lan using SSH to add myself as remote device, add sysvol sync and get syncthing configuration...
Traceback (most recent call last):
  File "/opt/tis-sysvolsync/sysvolsync.py", line 430, in <module>
    main()
  File "/opt/tis-sysvolsync/sysvolsync.py", line 420, in main
    syncthing.add_mutual_sysvol_sync(local_dc,remote_dc)
  File "/opt/tis-sysvolsync/sysvolsync.py", line 293, in add_mutual_sysvol_sync
    remote_jsonconfig = subprocess.check_output('ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no %s python3 /opt/tis-sysvolsync/sysvolsync.py -ldebug -f /var/log/sysvolbind.log add-remote %s %s tcp://%s:%s' % (
  File "/usr/lib/python3.9/subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no debian-dc2.mondomaine.lan python3 /opt/tis-sysvolsync/sysvolsync.py -ldebug -f /var/log/sysvolbind.log add-remote SAF4TGP-RAASEMZ-JCYHRWR-ER4G2V4-2WGVTGN-XOVSZ4T-SARXPBP-RLGWCQK debian-dc1.mondomaine.lan tcp://debian-dc1.mondomaine.lan:22001' returned non-zero exit status 255.

Crash on configure

On CentOS 7 with prebuilt package and on CentOS 8 with built package there is a crash when doing :
/opt/tis-sysvolsync/sysvolsync.py configure

The error is reproduced below :
2020-10-21 12:07:59,536 CRITICAL Error in data : CSRF Error for path system/status Traceback (most recent call last): File "/opt/tis-sysvolsync/sysvolsync.py", line 409, in <module> main() File "/opt/tis-sysvolsync/sysvolsync.py", line 348, in main syncthing = SyncThing() File "/opt/tis-sysvolsync/sysvolsync.py", line 87, in __init__ self.id = self.get_syncthing_id() File "/opt/tis-sysvolsync/sysvolsync.py", line 158, in get_syncthing_id return self.syncthing_rest_get('system/status')['myID'] File "/opt/tis-sysvolsync/sysvolsync.py", line 131, in syncthing_rest_get return json.loads(data.content or '{}') File "/usr/lib64/python2.7/json/__init__.py", line 338, in loads return _default_decoder.decode(s) File "/usr/lib64/python2.7/json/decoder.py", line 366, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib64/python2.7/json/decoder.py", line 384, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.