Friday, October 20, 2017

How to unassociated a file type in Redhat/CentOS 7

They are located in:

/home/username/.config/mimeapps.list

Inside you should see the file type.  Remove and save it.  It should go back to how it was originally.

Friday, October 6, 2017

How to add remote disc to macOS 10.12

Open a terminal:

mac:~ user$ sudo defaults write /Library/Preferences/com.apple.NetworkBrowser EnableODiskBrowsing -bool true
Password:
mac:~ user$ killall Finder

Open Finder
Go to Devices
Select your hard drive
You should now see Remote Disc

Tuesday, September 26, 2017

Building a Media Server with Plex

I've been using Plex (www.plex.tv) for a while now but I just could never find the right setup. I think I'm getting closer so I decided I'm going to start documenting it here. Throughout my search, I've never found 1 page that says here is how you do it. Hopefully that will change with this page.

Step 1
Purchase a DVD or Bluray and then Rip it. For this step we are using MakeMKV (www.makemkv.com).  After installing and running it, put the disc in and have it start scanning the disc.  Once it loads you will see multiple lines that look the same. You want to select all lines that have a lot of chapters. That is one way of knowing it's the feature film.  We just don't know which is the language we want.

Step 2
Select the Subtitles of your language and the forced subtitles below the line you already selected. For example, sometimes you might find more than 1 english, so select them all. If you are unsure if the movie has subtitles, here is a google doc that people are updating. Click Here.  You can also set this language in the menus so it only checks the language you set when you open it.

Step 3
Go ahead and start the ripping process.  Once it's done, you'll either have 1 file or multiple ones.  If you have multiple ones you need to figure out which one is the one you want.  Download VLC Player and open it there.  Once you hit the title of the movie you'll know if it's the right language.

Step 4
Extracting subtitles would be the next thing to do.  This where things start to get tricky.  You'll need at least a Windows machine (maybe a Mac).

You need to download:
  • https://mkvtoolnix.download/
  • https://www.videohelp.com/software/Subtitle-Edit
Next thing is to open back up VLC and turn the subtitles on and off one at a time.  Based off the google doc, some lines tell you which track # was the forced subtitles.  This just takes a little trial and error.  Once you figure it out, open mkvtools and open the mkv.

Select the track subtitle and click extract.  Once it's done, you're going to open it in Subtitle-Edit.  It will allow you to review your subtitles and then it exports it as a srt.  Copy it to the folder where your movie will be.  We will rename it to The_Exact_Name_of_the_Movie.language.forced.srt.  Plex will know its forced and auto select it.

Step 5
We need to convert the mkv to something that will direct play.  I've fought with this a lot always trying to rip it as high of quality as I can so it looks good on any screen.  The only problem is by doing that it buffers a ton or it has to transcode.  My new goal is to get everything where they play without transcoding and still look good.

I used the sickbeard_mp4_automater (Link) to convert it to mp4.  Here is my code:

autoProcess.ini
[MP4]
ffmpeg = C:\Users\Username\Desktop\sickbeard_mp4_automator-master\ffmpeg.exe
ffprobe = C:\Users\Username\Desktop\sickbeard_mp4_automator-master\ffprobe.exe
threads = auto
output_directory = 
copy_to = 
move_to = 
output_extension = mp4
output_format = mp4
delete_original = False
relocate_moov = True
video-codec = h264,x264
video-bitrate = 8000
video-crf = 
video-max-width = 
h264-max-level = 
use-qsv-decoder-with-encoder = True
ios-audio = True
ios-first-track-only = True
ios-audio-filter = 
ios-move-last = False
max-audio-channels = 
audio-codec = ac3,mp3,dts,dca,aac
audio-language = eng
audio-default-language = eng
audio-channel-bitrate = 256
audio-filter = 
audio-copy-original = False
subtitle-codec = srt
subtitle-language = eng
subtitle-default-language = eng
subtitle-encoding = 
fullpathguess = True
convert-mp4 = False
tagfile = True
tag-language = en
download-artwork = Poster
download-subs = False
embed-subs = False
embed-only-internal-subs = False
sub-providers = addic7ed,podnapisi,thesubdb,opensubtitles
permissions = 0777
post-process = False
pix-fmt = 
aac_adtstoasc = False
preopts = 
postopts = 
Couple of things to note:
video-bitrate I leave blank when I am testing out something.  That way it doesn't have to re-encode so its faster testing.  I'm still testing but size vs quality, I'm thinking Bluray will be around 8000 and DVDs will be around 3000.

I scrapped all of the sickbeard stuff for right now.  It's quality was ok but file sizes were still huge.  I have switched over to handbrake.  I'm doing super high quality for Blurays and High Quality for DVDs. I've been super happy with quality.

Some additional Links worth tagging:


Friday, July 14, 2017

Hackintosh Dell Precision T3500 macOS Sierra 10.12

Currently up and working. Will document all settings and configurations.

Thursday, September 29, 2016

How to rename your Spacewalk Server

This will also fix an error message if you are getting a certificate name error from your spacewalk clients.  This will cause the repos to show 0 packages even though spacewalk reports there are 1,000s of packages in the repo.  Other error messages "The SSL certificate failed verification."

On your spacewalk server you can check the cert:

openssl verify -CAfile /var/www/html/pub/RHN-ORG-TRUSTED-SSL-CERT /etc/pki/spacewalk/jabberd/server.pem

You can also verify if your server name matches the certificate name by running the spacewalk rename script.

Before running the command, you need to install the spacewalk-utils

yum spacewalk-utils

spacewalk-hostname-rename x.x.x.x

The Xs are your servers IP.  It'll tell you the name it is reading.  Compare that to the file in /root/ssl-build/rhn-ca-openssl.cnf.  You are looking for cn=.

Now assuming that names don't match or you want to change your server name:

RHEL 7
hostnamectl set-hostname newservername

RHEL6
hostname newname

vim /etc/sysconfig/network

Now verify the new name is working

hostname

Now we need to create new certs.

rhn-ssl-tool --gen-ca --force

rhn-ssl-tool --gen-server

Now you need to install the new certs.

rpm -ivh --force ~/ssl-build/spacewalk/rhn-org-httpd-ssl-key-pair-spacewalk-1.0-2.noarch.rpm

Copy the new files to the apache folder so the clients can access it

cp ~/ssl-build/rhn-org-trusted-ssl-cert-1.0-2.noarch.rpm /var/www/html/pub/

chown apache /var/www/html/pub/rhn-*

Note:  The rhn-org-trusted-ssl-cert-1.0-2.noarch.rpm changed on me.  The original was 1.0-1.

Now even though it's showing everything is right the spacewalk rename tool won't work until you reboot.  So reboot and then run:

spacewalk-hostname-rename x.x.x.x

Then do like you would normally:

rpm -Uvh http://servername.domain.com/pub/rhn-org-trusted-ssl-cert-1.0-2.noarch.rpm --force

Note: Notice that I added the --force argument

rhnreg_ks --serverUrl=https://servername.domain.com/XMLRPC --sslCACert=/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT --activationkey=1-activationkeyname

Note: If the system is already registered, you must add --force to the rhnreg_ks command.

Monday, September 26, 2016

Error: /usr/lib64/python2.6/site-packages/pycurl.so: undefined symbol: CRYPTO_set_locking_callback

This error messages gets thrown when I run ANY yum command.  After lots of googling and finding nothing I stumbled upon part of the solution (First Link Below).

The page pointed out a system variable "LD_LIBRARY_PATH".  This variable was not set on working machines but it WAS set on machines that had Matlab installed.

I believe matlab must set this for root account which breaks yum.  Here is how I fixed it.  There was a user named matlab_user already created so I just moved the value to the user's bash profile.

This is for the root account
echo "export LD_LIBRARY_PATH=" >> /root/.bashrc
cat /root/.bashrc

This is for the matlab_user
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/MATLAB/MATLAB_Runtime/v81/runtime/glnxa64:/opt/MATLAB/MATLAB_Runtime/v81/bin/glnxa64:/opt/MATLAB/MATLAB_Runtime/v81/sys/os/glnxa64:/opt/MATLAB/MATLAB_Runtime/v81/sys/java/jre/glnxa64/jre/lib/amd64/native_threads:/opt/MATLAB/MATLAB_Runtime/v81/sys/java/jre/glnxa64/jre/lib/amd64/server:/opt/MATLAB/MATLAB_Runtime/v81/sys/java/jre/glnxa64/jre/lib/amd64:/opt/MATLAB/MATLAB_Runtime/v84/runtime/glnxa64:/opt/MATLAB/MATLAB_Runtime/v84/bin/glnxa64:/opt/MATLAB/MATLAB_Runtime/v84/sys/os/glnxa64:/opt/MATLAB/MATLAB_Runtime/v85/runtime/glnxa64:/opt/MATLAB/MATLAB_Runtime/v85/bin/glnxa64:/opt/MATLAB/MATLAB_Runtime/v85/sys/os/glnxa64" >> /home/matlab_user/.bashrc

cat /home/matlab_user/.bashrc

Source:  Link

Fixing Nessus Finding Remote Desktop Protocol Network Level Authentication through GPO

How to fix the Nessus Finding Remote Desktop Protocol Network Level Authentication through GPO.

Click Start -> Control Panel -> Administrative Tools -> Group Policy Management

Step 1:

Open Computer Configuration -> Policies -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Security ->

Require User Authentication for Remote Connections by Using Network Level Authentication -> Enabled

Set Client Connection Encryption Level - > Enabled
Encryption Level: High Level

Fixing Nessus POODLE Finding through GPO

How to fix the  Nessus POODLE Finding through GPO.

Click Start -> Control Panel -> Administrative Tools -> Group Policy Management

Step 1:

Open Computer Configuration -> Policies -> Administrative Templates -> Windows Components -> Internet Explorer - > Internet Control Panel -> Advanced Page -> Turn off Encryption support -> Enabled

Should be set to:  User TLS 1.0, TLS 1.1, and TLS 1.2

Step 2:

Click Computer Configuration -> Preferences -> Windows Settings -> Registry -> Right Click, New Registry Item.

Reg Item 1:

Action: Update
Hive: HKLM
Key Path: SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Client
Value Name: Enabled
Value Type: REG_DWORD
Value Data: 0

Reg Item 2:

Action: Update
Hive: HKLM
Key Path: SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Server
Value Name: Enabled
Value Type: REG_DWORD
Value Data: 0

Fixing Microsoft Security Bulletin MS15-124 Finding in Nessus

How to fix the Microsoft Security Bulletin MS15-124 Finding in Nessus.

Click Start -> Control Panel -> Administrative Tools -> Group Policy Management

Click Computer Configuration -> Preferences -> Windows Settings -> Registry -> Right Click, New Registry Item.

Reg Item 1:

Action: Update
Hive: HKLM
Key Path: SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_ALLOW_USER32_EXCEPTION_HANDLER_HARDENING
Value Name: iexplore.exe
Value Type: REG_DWORD
Value Data: 1

Reg Item 2:

Action: Update
Hive: HKLM
Key Path: SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_ALLOW_USER32_EXCEPTION_HANDLER_HARDENING
Value Name: iexplore.exe
Value Type: REG_DWORD
Value Data: 1

Nessus Finding: Hardened UNC Path through a GPO

How to fix the Nessus Hardened UNC Path finding.

Click Start -> Control Panel -> Administrative Tools -> Group Policy Management

Computer Configuration -> Policies -> Administrative Templates -> Network -> Network Provider -> Hardened UNC Paths -> Set to Enable

Scroll down and click show.  Enter the following:

ShareThis