Tag Archives: Command Line

How To Delete a File In Linux

By | 2019-01-10

There are two main ways to delete a file on a Linux based operating system. Keep in mind that removing a file as described in this guide just removes references to the underlying storage system. Forensic tools may be able to recover their contents. There are ways to delete files that prevent their recovery, but… Read More »

Rsync Backups

By | 2018-10-13

Rsync backups are versatile. You can can create full, differential and incremental backups of a directory. Rsync can backup files locally or remotely. Local Backups If you are backing up to another directory, removable storage, or a locally mounted network file system, then you will be creating local backups. Creating Local Backups To create a… Read More »

Managing OpenLDAP

By | 2018-07-21

This guide explains how to use the OpenLDAP client tools to manage an OpenLDAP directory server. I am assuming you have root access to your directory server. Common Options There are some options common to all of the OpenLDAP tools used in this guide. I recommend creating shell aliases for the ldap commands with these… Read More »

Search Active Directory with Ldapsearch

By | 2018-07-04

It is fairly common to have Linux or UNIX machines on a network with a Microsoft Active Directory (AD) domain. There may be times when you want or need to search Active Directory with ldapsearch. Quick Example Using TLS ldapsearch -H ldaps://dc.example.com -x -W -D “user@example.com” \    -b “dc=example,dc=com” “(sAMAccountName=user)” Without TLS ldapsearch -H… Read More »

How To Delete a Directory in Linux

By | 2018-06-28

There are a few ways you can delete a directory on Linux and UNIX systems. If you are using a desktop environment, you can probably right click on it in your file manager and select the appropriate option. If you are using the command line, you can use either the rm command, or the rmdir… Read More »

How To Find Broken Symbolic Links

By | 2018-06-27

Sometimes you may want to find and remove broken symbolic links from your systems. For example, OSSEC will complain if it finds broken symbolic links in directories it monitors. This guide should work on almost any Linux or UNIX like operating system. The following command will list broken symbolic links in the directory you specify.… Read More »

How To Backup and Restore OpenLDAP

By | 2016-10-04

This guide assumes familiarity with UNIX like operating systems, X.500, LDAP and OpenLDAP. The Directory Backups section of the OpenLDAP 2.4 Administrator’s Guide, as of September 28, 2016, doesn’t have any kind of restoration procedures. This guide will help you do it. Backup OpenLDAP There are two methods for backing up OpenLDAP. One is to… Read More »

Self-Signed Certificate How-To

By | 2016-09-27

This guide will show you how to create a self-signed certificate with various tools. Quick Reference OpenSSL With New RSA Key openssl req -days 500 -newkey rsa:4096 -keyout privkey.pem -nodes -sha256 -x509 -out cert.pem With Existing RSA Key openssl req -days 500 -key privkey.pem -nodes -sha256 -x509 -out cert.pem Option Required What It Does req… Read More »