semvec/pypi-packages huggingface dataset:
techlib-nr-common-metadata 3.0.0a49
NR common data types
License: MIT
Requires Python: >=3.8,<4.0
Keywords: National,Repository,common,model,Invenio

# nr-common-metadata

[![Build Status](https://travis-ci.org/Narodni-repozitar/nr-common.svg?branch=master)](https://travis-ci.org/Narodni-repozitar/nr-common)
[![Coverage Status](https://coveralls.io/repos/github/Narodni-repozitar/nr-common/badge.svg)](https://coveralls.io/github/Narodni-repozitar/nr-common)

Disclaimer: The library is part of the Czech National Repository, and therefore the README is written in Czech.
General libraries extending [Invenio](https://github.com/inveniosoftware) are concentrated under the [Oarepo
 namespace](https://github.com/oarepo).
 
 ## Instalace
 
 Nejedná se o samostatně funkční knihovnu, proto potřebuje běžící Invenio a závislosti Oarepo.
 Knihovna se instaluje klasicky přes pip
 
```bash
pip install techlib-nr-common-metadata
```

Pro testování a/nebo samostané fungování knihovny je nutné instalovat tests z extras.

```bash
pip install -e .[tests]
```

## Účel

Knihovna obsahuje obecný metadatový model Národního repozitáře (Marshmallow, JSON schema a Elastisearch mapping).
Všechny tyto části lze 
"podědit" v dalších metadatových modelech.

Knihovna není samostatný model pro "generic" věci - ten je v nr-generic.
smbjoin 0.1.1
Offline Windows AD domain join tool for Samba
License: MIT
Requires Python: >=3.6
Keywords: ADS,Samba,TDB,Windows

Offline Windows AD domain join tool for Samba
=============================================

Implements a custom `smb-net-ads-join` utility, which performs the same
operation as `net ads join` Samba command, but works completely offline.

To join a Samba system to an AD domain it needs `SYSTEM`, `SECURITY` and `SAM`
registry hive files from a Windows system that is already joined to
the same domain.

Usage
-----

```
usage: smb-net-ads-join [-h] [-v] [-V] [-J] [-o FILE] DIR

positional arguments:
  DIR                   Windows registry hive files directory (e.g. '/Windows/System32/config')

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         print intermediate results and debug info
  -V, --version         show program's version number and exit
  -J, --json            generate 'secrets.json' file in place of 'secrets.tdb'
  -o FILE, --output FILE
                        generated 'secrets.tdb' file name and location
```

### Example invocation

Assuming that Windows drive `C:\` is mounted to `/mnt/windows/`:

```
$ smb-net-ads-join /mnt/windows/Windows/System32/config
Using short domain name -- DOMAIN
Joined 'HOSTNAME' to realm 'domain.company.com'
```

A new database file `secrets.tdb` is created in the current directory.

It must be placed into `/var/lib/samba/private/` and,
with an appropriate `smb.conf` configuration,
`winbindd` will run as if `net ads join` command was executed.

### Common errors

When the Windows machine is not joined to an ADS domain:

```
$ smb-net-ads-join /mnt/windows/Windows/System32/config
WARNING:smbjoin.cli:Registry hive access failed: Did not find $MACHINE.ACC at Policy
CRITICAL:smbjoin.cli:Extracting secrets failed: Machine account password key does not exist
error: Domain machine account data was not found in the registry
```