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...
$ 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 “uid=<ADMIN_USER>,cn=users,cn=compat,dc=,dc=com” -b “cn=users,cn=accounts,dc=,dc=com” -x -W
$ ldapsearch -H ldap://<IP_SERVER> -D “uid=<ADMIN_USER>,cn=users,cn=compat,dc=,dc=com” -b “dc=,dc=com” -x -W -s one...
The Linux mlocate command under macOS
sudo /usr/libexec/locate.updatedb sudo ln -s /usr/libexec/locate.updatedb /usr/local/bin/updatedb
Step 1: Open Settings in Windows 11
Step 2: Go to Apps
Step 3: Go to Advanced app settings
Step 4: Go to App execution aliases
Step 5: Disable the option for python.exe and python3.exe