Notities

Notities

ing. M.A.C.M. (Martijn) van den Boom

Computer Infrastructure Engineer
ingenieur, docent en mentor

Social Media Links:

ing. M.A.C.M. (Martijn) van den Boom

3-Minute Read

You can use this script to retrieve the name of your USB stick. The name of your USB stick can be used in Apple's sudo command to create a USB installer. Step 1: Open the Terminal application Step 2: Go to your home directory, type: # cd Step 3: Optionally create a scripts directory, type: # mkdir scripts Step 4: Navigate to the newly created scripts directory, type: # cd scripts

ing. M.A.C.M. (Martijn) van den Boom

1-Minute Read

Boot into the Windows installer On the first screen press SHIFT + F10 # diskpart # list disk # select disk 0 # list part Look for the Windows partition # select part 3 # assign letter=W # format quick fs=NTFS # list volume Look for the EFI volume # select volume 2 # assign letter=Z # exit # D: Goto the USB installer of Windows # cd D:\sources # dir install* The file install.

ing. M.A.C.M. (Martijn) van den Boom

1-Minute Read

# hdiutil convert /path/to/refit-0.14.cdr -format UDRW -o /path/to/refit-0.14.img # diskutil list # diskutil unmountDisk /dev/disk2 # sudo dd if=/path/to/refit-0.14.img.dmg of=/dev/rdisk2 bs=1m Using rdisk2 here seems to speed up things # diskutil eject /dev/disk2

ing. M.A.C.M. (Martijn) van den Boom

1-Minute Read

Follow the steps below to install rEFIt to the EFI partition of an iMac Download rEFIt and copy the efi folder to the /efi folder as explained below Before you do the bless command disable the SIP Boot in recovery mode # csrutil status # csrutil disable # reboot sudo mkdir /efi sudo mount -t msdos /dev/disk0s1 /efi sudo bless --mount /efi --setBoot --file /efi/EFI/refit/refit.efi --labelfile /efi/EFI/refit/refit.vollabel

ing. M.A.C.M. (Martijn) van den Boom

1-Minute Read

To make a script to run remote commands in a client server network. import subprocess def ssh_exec_command(hostname, username, command): ssh_cmd = ['ssh', f'{username}@{hostname}', command] ssh_process = subprocess.Popen( ssh_cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True ) output, error = ssh_process.communicate() if error: print("Error:", error) else: print("Output:", output) # Replace these with your actual credentials and command...

ing. M.A.C.M. (Martijn) van den Boom

1-Minute Read

In case you have an old legacy system with Python 2 still in use and want to make a script to run certain commands in a client server network. import subprocess def ssh_exec_command(hostname, username, private_key_path, command): ssh_cmd = ['ssh', '-i', private_key_path, '-o', 'StrictHostKeyChecking=no', f'{username}@{hostname}', command] ssh_process = subprocess.Popen( ssh_cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE ) output, error = ssh_process.communicate() if...

ing. M.A.C.M. (Martijn) van den Boom

1-Minute Read

=== Identity, Policy, and Audit (IPA) system === Jenkins 2.319.2 === Dashboard -> Security -> Configure Global Security Server: ldap://<IP_SERVER>:389 root DN: dc=,dc=com User search base cn=users,cn=accounts User search filter uid={0} Group search base cn=groups,cn=accounts Group membership -> Search for LDAP groups containing user -> Group membership filter: (| (member={0}) (uniqueMember={0}) (memberUid={1})) Manager DN: uid=<ADMIN_USER>,cn=users,cn=accounts,dc=,dc=com

ing. M.A.C.M. (Martijn) van den Boom

1-Minute Read

=== Nexus Sonatype Nexus Repository OSS 3.60.0-02 === LDAP ldap://<IP_SERVER>:389 cn=users,cn=accounts,dc=,dc=com Simple Authentication uid=<ADMIN_USER>,cn=users,cn=accounts,dc=,dc=com Next === Select no template User relative DN = leeg User subtree = unchecked Object class: inetOrgPerson User filter = leeg User ID attribute = uid Real name attribute = cn Email attribute = mail Password attribute = leeg Map LDAP groups as roles = unchecked

ing. M.A.C.M. (Martijn) van den Boom

1-Minute Read

Configure LDAP/IPA Server with Sonarqube === Sonarqube 8.9.6 sonar.properties sonarqube-8.9.6/conf/sonar.properties === sonar.security.realm=LDAP ldap.url=ldap://<IP_SERVER>:389 ldap.bindDn=uid=<ADMIN_USER>,cn=users,cn=accounts,dc=,dc=com ldap.bindPassword= ldap.authentication=simple ldap.user.baseDn=cn=users,cn=accounts,dc=,dc=com # laat volgende default # ldap.user.request= # LDAP user request. (default: (&amp;(objectClass=inetOrgPerson)(uid={login})) )...

ing. M.A.C.M. (Martijn) van den Boom

1-Minute Read

$ ldapsearch -H ldap://<FQDN_SERVER>/ -b dc=,dc=com -x $ ldapsearch -x -LLL -H ldap:/// -b dc=,dc=com dn $ ldapwhoami -x -H ldap:/// $ ldapsearch -H ldap://<IP_SERVER> -D &ldquo;uid=<ADMIN_USER>,cn=users,cn=compat,dc=,dc=com&rdquo; -b &ldquo;cn=users,cn=accounts,dc=,dc=com&rdquo; -x -W $ ldapsearch -H ldap://<IP_SERVER> -D &ldquo;uid=<ADMIN_USER>,cn=users,cn=compat,dc=,dc=com&rdquo; -b &ldquo;dc=,dc=com&rdquo; -x -W -s one...

Recent Posts:

Categories

About

Sponsor me link:
ko-fi.com/martijnvandenboom
paypal.me/ingmacmvandenboom
buymeacoffee.com/ingvdboom