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: Raspberry PI – Chromium didn’t shut down correctly – How to fix

When using Chromium as a Kiosk it will not shutdown properly on reboot.  As a result it throws an error every time it restarts. Here is my fix(This assumes you are using pi as your auto login user): 1. mkdir /home/pi/scripts 2. nano /home/pi/scripts/chromiumcleanup 3. Add the following: #!/bin/bash /bin/sed -i ‘s/”exit_type”:”Crashed”/”exit_type”:”Normal”/’ ~/.config/chromium/Default/Preferences 4. ctrl

View More ››
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

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

View More ››