Go to ...

Techpository

A Better Technical Repository

RSS Feed

Techpository

Welcome to Techpository.  This is a personal repository of helpful information.  Content on this site is both self-created and copied from other resources.  We try to make sure we give credit where credit is due.  Use the information on this site at your own risk.

Linux

Linux: Automatically mount cifs from linux to windows with different smb versioning

To automount cifs from linux to windows 2016 you can do the following //remoteserver/sharename /localserver/foldername cifs credentials=/yourcredfilelocation,iocharset=utf8,sec=ntlmv2,vers=3.0     0    0 Put the following in your credential file. [email protected] password=password Then you can type the following command: mount -a If you receive an code = -22 error there is probably something wrong in the options

View More ››
Programming

Powershell: Pull all user’s displaynames, emailaddress, samaccountname

Install needed powershell modules: import-module servermanager Add-WindowsFeature -Name “RSAT-AD-PowerShell” -IncludeAllSubFeature import-module activedirectory Run the following command: Get-ADUser -Filter * -Properties DisplayName, EmailAddress, SamAccountName | select DisplayName, EmailAddress, SamAccountName | Export-CSV “C:\Email_Addresses.csv” By: Timothy Jay Conrad

Linux

Linux: Monitor multiple servers using ping and email on failure

Steps to monitor a website using curl: 1. Create the main script file 2. Create a site list file 3. Create a cron job 1. main scripts Working directory /home/username/scripts vi /home/username/scripts/pingmysites #!/bin/bash SITESFILE=/home/usernamescripts/servers.txt #list the sites you want to monitor in this file EMAILS=”[email protected]” #list of email addresses to receive alerts (comma separated) while

View More ››
Linux

Linux: Command Line to monitor a websites status

Steps to monitor a website using curl: 1. Create the main script file 2. Create a site list file 3. Create a cron job 1. main scripts Working directory /home/username/scripts vi /home/username/scripts/checkmysites #!/bin/bash SITESFILE=/home/usernamescripts/sites.txt #list the sites you want to monitor in this file EMAILS=”[email protected]” #list of email addresses to receive alerts (comma separated) while

Linux

Ubuntu: Bond two network cards together

Bonding, also called port trunking or link aggregation means combining several network interfaces (NICs) to a single link, providing either high-availability, load-balancing, maximum throughput, or a combination of these. In this example you will first need to disable Network Manager if you are currently using it. sudo systemctl stop NetworkManager.service sudo systemctl disable NetworkManager.service Installation

View More ››