wget https://dl.eff.org/certbot-auto
<code>wget -O - https://get.acme.sh | sh</code>
wget https://dl.eff.org/certbot-auto
<code>wget -O - https://get.acme.sh | sh</code>
Pewnej nocy przestał działać. Okazało się, że dovecot zaczął się odwoływać do hostów DomainDNSZones i ForestDNSZones bez loginu i hasła.
Pomogło dodanie:
REFERRALS no
Do /etc/ldap.conf i /etc/openldap/ldap.conf
Przez DHCP można przekazywać wpisy do tabeli routingu.
Robi się to definiując opcję 121 i jako jej wartość szesnastkowo podając trasy – ciąg postaci:
prefix maska brama
Dla wielu tras te ciągi się ze sobą łączy.
Kalkulator w Pythonie generujćcy odpowiedni ciąg:
def hex_encode(route): return b"".join([b"%02x" % octet for octet in route]) routes = [ (24, 10,1,10, 192,168,1,123 ), (24, 10,1,11, 192,168,1,123 ), (0, 192,168,1,1 ), ] print(b"".join(hex_encode(route) for route in routes))
Wygeneruje to ciąg: 180a010ac0a8017b180a010bc0a8017b00c0a80101
Po dodaniu dysku w VMWare:
echo "- - -" > /sys/class/scsi_host/host#/scan fdisk -l
Po zmianie rozmiaru dysku z poziomu VMWare:
echo 1 > /sys/class/scsi_device/0\:0\:1\:0/device/rescan
Samba czasem nie daje praw do edycji polityk, mimo, że powinna.
Pomaga:
samba-tool ntacl sysvolreset
https://wiki.samba.org/index.php/Setup_a_Samba_AD_Member_Server
W /etc/nsswitch.conf:
passwd: files winbind group: files winbind
W /etc/samba./smb.conf:
security = ADS realm = spnt.local idmap config *:backend = tdb idmap config *:range = 70001-80000 idmap config SAMDOM:backend = ad idmap config SAMDOM:schema_mode = rfc2307 idmap config SAMDOM:range = 500-40000 winbind nss info = rfc2307 winbind trusted domains only = no winbind use default domain = yes winbind enum users = yes winbind enum groups = yes Chyba (?) jeszcze /etc/krb5.conf
Musi być winbind i wbinfo -u musi pokazywać użytkowników domenowych
net ads join -U pmuszynski
domain mojadomena.local nameserver moje.i.p
rpcbind
service rpcbind start rm /etc/samba/smb.conf samba-tool domain provision --use-rfc2307 --interactive samba-tool user setexpiry administrator --noexpiry mkdir /var/run/samba poldek -i cups service cups start service samba start
I wszystko – działa 🙂
Jeszcze można wyłączyć wymaganie skomplikowanych haseł:
samba-tool domain passwordsettings set --complexity=off
Szczegłóy w:
samba-tool domain passwordsettings --help
When I have to copy a large amount of data, I usually use a combination of tar and rsync. The first pass is to tar it, something like this:
<code># (cd /src; tar cf - .) | (cd /dst; tar xpf -) </code>
Usually with a large amount of files, there will be some that tar can’t handle for whatever reason. Or maybe the process will get interrupted, or if it is a filesystem migration, the you might want to do the initial copy before the actual migration step. At any rate, after the initial copy, I do an rsync step to sync it all up:
<code># cd /dst; rsync -avPHSx --delete /src/ . </code>
Note that the trailing slash on /src/
is important.
awk -F. '{print >> "log" $4}' squid.log
Rozbicie wg trzeciego oktetu numeru IP