Uncategorized – Page 2 – the foremind

plex_firewalld-4863001I recently rebuilt my Plex Media Server box as a CentOS 7 VM running on Hyper-V on a Windows Server 2012 setup.

When I installed the rpm and started the service I found that I was unable to load the interface on my desktop. I knew that it was running because I installed netstat and I was able to see the port was open for traffic and I was also able to load the interface locally in lynx on the server.

Read moreCreating a firewalld service for Plex Media Server

As the new year broke upon us just over two weeks ago, I found myself wondering what resolutions I should make to improve myself during the next twelve months.  In the past I have made resolutions about inconsequential things like reading more books or taking more photos.  I even tried to participate in a photo a day and managed to make it through two months before giving up.

Read moreStarting anew in 2015 – a resolution

Solaris Tip of the Week: a better du experience – the foremind

cli_img-1821214

In my day job as a Systems Engineer I frequently find myself switching between different UNIX and Linux distributions.  While many of the commands exist on both sides of the aisle, I often find vast differences in the command line parameters that can be consumed by a given command when used in, for example, Linux vs Solaris.

Recently I came upon this again with the need to easily ferret out the majority consumer of drive space on a Solaris 10 system.  While we did have the xpg4 specification support available, the du command was still missing my favorite option “max-depth”.

In Linux I use this to limit the output to only the current directory level so that I don’t have to face to possibility of wading through a tremendously large listing of sub-directories to find the largest directory in the level I am in.  Unfortunately, in Solaris, even with xpg4, the du command doesn’t have this option, so my solution was to pipe the results through egrep and use that to filter out the sub-directories.

Here is some example output from a RedHat Linux 5.11 server:

[code language=”bash” gutter=”false”]
[[email protected] var]# du -h 8.0K ./games 8.0K ./run/saslauthd 8.0K ./run/lvm 8.0K ./run/setrans 8.0K ./run/ppp 8.0K ./run/snmpd 4.0K ./run/mysqld 8.0K ./run/pm 8.0K ./run/dbus 8.0K ./run/nscd 8.0K ./run/console 8.0K ./run/sudo 8.0K ./run/netreport 176K ./run 8.0K ./yp/binding 24K ./yp 8.0K ./lib/games 8.0K ./lib/mysql 4.0K ./lib/nfs/statd/sm.bak 8.0K ./lib/nfs/statd/sm 24K ./lib/nfs/statd 8.0K ./lib/nfs/v4recovery 0 ./lib/nfs/rpc_pipefs/statd 0 ./lib/nfs/rpc_pipefs/portmap 0 ./lib/nfs/rpc_pipefs/nfs/clntf 0 ./lib/nfs/rpc_pipefs/nfs/clnt5 0 ./lib/nfs/rpc_pipefs/nfs/clnt0 0 ./lib/nfs/rpc_pipefs/nfs 0 ./lib/nfs/rpc_pipefs/mount 0 ./lib/nfs/rpc_pipefs/lockd 0 ./lib/nfs/rpc_pipefs 40K ./lib/nfs 8.0K ./lib/dhclient 8.0K ./lib/iscsi/isns

[/code]

Here is the same example ouput from the RedHat server using the max-depth option:

[code language=”bash” gutter=”false”]
[[email protected] var]# du -h –max-depth=1 8.0K ./games 176K ./run 24K ./yp 22M ./lib 32K ./empty 1.5G ./log 12K ./account 236K ./opt 24K ./db 8.0K ./nis 2.9M ./tmp 8.0K ./tmp-webmanagement 40K ./lock 8.0K ./preserve 8.0K ./racoon 16K ./lost+found 1.4M ./spool 8.0K ./net-snmp 83M ./cache 8.0K ./local 1.6G .

[/code]

Here is the command example run without my egrep mod in Solaris 10:

[code language=”bash” gutter=”false”]
[[email protected] log]# /usr/xpg4/bin/du -h 25K ./webconsole/console 26K ./webconsole 1K ./pool 1K ./swupas 2K ./ilomconfig 1K ./current/ras1_sfsuperbatchb 1K ./current/od1_atl4sfsuperbatchb 4.3G ./current/ras1_atl4sfsbatchb 2.1G ./current/od1_atl4sfsbatchb 560K ./current/avs 2K ./current/ebaps/output 9.3M ./current/ebaps 4.0M ./current/psh 3.1M ./current/autoresponder 5K ./current/fdms_download 29K ./current/fdms_server 109K ./current/fmt 5K ./current/paris/output 653K ./current/paris 1K ./current/od1_sfsuperbatchb 28K ./current/ccTemplateLoader 633K ./current/ccTemplateLoaderLegacy 15M ./current/whinvoices 1K ./current/appmonitor.prod.netsol.com 132M ./current/chase 6.6G ./current 160K ./archive/ccTemplateLoader 1K ./archive/od1_atl4sfsuperbatchb 4.9M ./archive/avs 1K ./archive/ebaps/output 26M ./archive/ebaps 881M ./archive/psh 1014M ./archive/autoresponder 1K ./archive/fdms_download 6.8M ./archive/fdms_server 21M ./archive/paris 1K ./archive/ccTemplateLoaderLegacy 4.1G ./archive/ras1_atl4sfsbatchb 3.1G ./archive/od1_atl4sfsbatchb 5.9G ./archive/chase 102M ./archive/whinvoices 15G ./archive 22G .

[/code]

And here is the improved command output using my egrep mod on the same Solaris server:

[code language=”bash” gutter=”false”]
[[email protected] log]# /usr/xpg4/bin/du -hx | egrep -v ‘.*/.*/.*’ 26K ./webconsole 1K ./pool 1K ./swupas 2K ./ilomconfig 6.6G ./current 15G ./archive 22G .

[/code]

Creating a firewalld service for Plex Media Server – the foremind

plex_firewalld-5038841I recently rebuilt my Plex Media Server box as a CentOS 7 VM running on Hyper-V on a Windows Server 2012 setup.

When I installed the rpm and started the service I found that I was unable to load the interface on my desktop. I knew that it was running because I installed netstat and I was able to see the port was open for traffic and I was also able to load the interface locally in lynx on the server.

UPDATE: At some point I rebuilt my server and I came back to this post to grab my config.  It turns out that I had a typo in one place and a missing command in another.  I have edited this post to correct the issues.  I have followed the new steps on several machines and this process does work without adding additional files in: [code]/usr/lib/firewalld/services/[/code]

It turns out that there were two issues:

Disabling SELinux was as simple as editing the configuration file (/etc/selinux/config) and setting the value of selinux to disabled.

Dealing with firewalld was also initially simple as well:

[code language=”bash”]# systemctl stop firewalld[/code]

The problem with this approach is that I was completely disabling my server’s software firewall. The proper approach would be to create a ruleset that allows for the various ports of Plex Media Server to be open in my server’s active firewalld zone.

Fortunately this is relatively easy to accomplish:

  1. Create the new service configuration file in the services directory
    [code language=”bash”]# vi /etc/firewalld/services/plexmediaserver.xml[/code]
  2. Next add the ruleset using the XML format established for firewalld rules[code language=”xml”] plexmediaserver Plex TV Media Server

    [/code]

  3. Save the service file
  4. Reload the firewalld configs [code language=”bash”]# firewall-cmd –reload

    success[/code]

  5. Add the service to your active zone (by default it is the public zone, but I have changed my default zone to be the home zone)
  6. [code language=”bash”]# firewall-cmd –permanent –zone=public –add-service=plexmediaserver
    success[/code]
  7. Restart the firewalld service[code language=”bash”]# systemctl restart firewalld.service[/code]
  8. You can get the defined service list from firewalld as follows: [code language=”bash”]# firewall-cmd –get-services

    RH-Satellite-6 amanda-client bacula bacula-client dhcp dhcpv6 dhcpv6-client dns freeipa-ldap freeipa-ldaps freeipa-replication ftp high-availability http https imaps ipp ipp-client ipsec iscsi-target kerberos kpasswd ldap ldaps libvirt libvirt-tls mdns mountd ms-wbt mysql nfs ntp openvpn plexmediaserver pmcd pmproxy pmwebapi pmwebapis pop3s postgresql proxy-dhcp radius rpc-bind rsyncd samba samba-client smtp ssh telnet tftp tftp-client transmission-client vdsm vnc-server wbem-https[/code]

Now that this is done you should be able to hit the Plex Media Server web interface from a web browser on any other machine in your network.

Creating a firewalld service for Plex Media Server – the foremind

plex_firewalld-5620352I recently rebuilt my Plex Media Server box as a CentOS 7 VM running on Hyper-V on a Windows Server 2012 setup.

When I installed the rpm and started the service I found that I was unable to load the interface on my desktop. I knew that it was running because I installed netstat and I was able to see the port was open for traffic and I was also able to load the interface locally in lynx on the server.

UPDATE: At some point I rebuilt my server and I came back to this post to grab my config.  It turns out that I had a typo in one place and a missing command in another.  I have edited this post to correct the issues.  I have followed the new steps on several machines and this process does work without adding additional files in: [code]/usr/lib/firewalld/services/[/code]

It turns out that there were two issues:

Disabling SELinux was as simple as editing the configuration file (/etc/selinux/config) and setting the value of selinux to disabled.

Dealing with firewalld was also initially simple as well:

[code language=”bash”]# systemctl stop firewalld[/code]

The problem with this approach is that I was completely disabling my server’s software firewall. The proper approach would be to create a ruleset that allows for the various ports of Plex Media Server to be open in my server’s active firewalld zone.

Fortunately this is relatively easy to accomplish:

  1. Create the new service configuration file in the services directory
    [code language=”bash”]# vi /etc/firewalld/services/plexmediaserver.xml[/code]
  2. Next add the ruleset using the XML format established for firewalld rules[code language=”xml”] plexmediaserver Plex TV Media Server

    [/code]

  3. Save the service file
  4. Reload the firewalld configs [code language=”bash”]# firewall-cmd –reload

    success[/code]

  5. Add the service to your active zone (by default it is the public zone, but I have changed my default zone to be the home zone)
  6. [code language=”bash”]# firewall-cmd –permanent –zone=public –add-service=plexmediaserver
    success[/code]
  7. Restart the firewalld service[code language=”bash”]# systemctl restart firewalld.service[/code]
  8. You can get the defined service list from firewalld as follows: [code language=”bash”]# firewall-cmd –get-services

    RH-Satellite-6 amanda-client bacula bacula-client dhcp dhcpv6 dhcpv6-client dns freeipa-ldap freeipa-ldaps freeipa-replication ftp high-availability http https imaps ipp ipp-client ipsec iscsi-target kerberos kpasswd ldap ldaps libvirt libvirt-tls mdns mountd ms-wbt mysql nfs ntp openvpn plexmediaserver pmcd pmproxy pmwebapi pmwebapis pop3s postgresql proxy-dhcp radius rpc-bind rsyncd samba samba-client smtp ssh telnet tftp tftp-client transmission-client vdsm vnc-server wbem-https[/code]

Now that this is done you should be able to hit the Plex Media Server web interface from a web browser on any other machine in your network.

October 2015 – the foremind

October 5, 2015 by Andrew Fore

One of the tools that I use on a regular basis to test network connectivity updates is the “z” option of netcat.  Apparently when RedHat rolled out the latest version of their distribution of RedHat Enterprise Linux (RHEL) they decided to move to using the nmap-ncat package instead of the nc package.  The command options a very different.

So when attempting to test single port like I would have under previous releases I now use the following syntax:

# echo | nc -w1 $host $port >/dev/null 2>&1 ;echo $?

If the result that is returned is a zero then you have successfully connected to the remote host on the desired port. This also applies to CentOS 7 since it is a “clone” or copyleft port of the RHEL7 binaries.

Categories Uncategorized Tags CentOS, Linux, Tips n Tricks, Uncategorized 1 Comment January 8, 2017October 4, 2015 by Andrew Fore

Editorial Note: Apparently Comcast really would prefer that people not use the term data cap when referring to the limitations being placed on their customers data usage and would much rather prefer that we use the term data usage plan or data threshold, however, I don’t really care. 🙂

Dear Comcast,

I would like to go on record as saying that you suck.  I recognize that you are a for profit company and that you would like to make a profit on the services that you provide.  I even think that having your company make a profit is a good thing because that enables you to pay your employees so that they can put food on their tables and afford to pay the fees for their children to participate in Little League baseball and other such childhood activities.

Your data usage cap system is bogus.  According to the data available on your own website you have eight (8) different trial markets where you have rolled out data caps since 2012:

  • August 1, 2012: Nashville, Tennessee – 300GB cap
  • October 1, 2012: Tucson, Arizona – 3 tiers (300GB, 350GB, 600GB)
  • August 22, 2013: Fresno, California – Economy Plus option added
  • September 1, 2013: Savannah, Georgia; Central Kentucky; Jackson, Mississippi – 300GB
  • October 1, 2013: Mobile, Alabama; Knoxville, Tennessee.
  • November 1, 2013: Huntsville, Alabama; Augusta, Georgia; Tupelo, Mississippi; Charleston, South Carolina; Memphis, Tennessee – 300GB cap
  • December 1, 2013: Atlanta, Georgia; Maine – 300GB cap
  • October 1, 2015: Fort Lauderdale, the Keys and Miami, Florida – 300GB cap plus $30 option for increasing to  unlimited

In fact, your page on this even refers to these as “trial start dates” which to a reasonably minded person would imply that they have an end date as well, however to the best of my knowledge (as well as the comments made by a customer support representative) there is no plan to end these trials OR any plan to actually collapse them into a single cohesive plan that applies to your entire service.

Read moreDear Comcast: You Suck

Categories Uncategorized Tags comcast, General, Personal, Uncategorized, usage cap 2 Comments

March 2, 2015 – the foremind

March 2, 2015 by Andrew Fore

If you are a Safari user then you are likely used to the “reader mode” which disables all the extra graphical stuff and focuses the view on the content of the article.  Thanks to a tip from Google Plus user Francois Beaufort, here’s how to enable it on the desktop (in Windows at the very least, I haven’t tried in any other OS).

If you’re on desktop, playing with it is as easy as running chrome with the –enable-dom-distiller switch. Once it’s done, you’ll notice a new “Distill page” menu item.

Hopefully this will make it to mainstream with a nice icon.

Categories Uncategorized Tags Google, Tips n Tricks, Uncategorized Leave a comment

October 5, 2015 – the foremind

October 5, 2015 by Andrew Fore

One of the tools that I use on a regular basis to test network connectivity updates is the “z” option of netcat.  Apparently when RedHat rolled out the latest version of their distribution of RedHat Enterprise Linux (RHEL) they decided to move to using the nmap-ncat package instead of the nc package.  The command options a very different.

So when attempting to test single port like I would have under previous releases I now use the following syntax:

# echo | nc -w1 $host $port >/dev/null 2>&1 ;echo $?

If the result that is returned is a zero then you have successfully connected to the remote host on the desired port. This also applies to CentOS 7 since it is a “clone” or copyleft port of the RHEL7 binaries.

Categories Uncategorized Tags CentOS, Linux, Tips n Tricks, Uncategorized 1 Comment

Sort JIRA Widget by two columns – the foremind

At work we use Atlassian JIRA as our  ticket system internally between the various teams.  I have various widget setup to watch predefined JIRA filters on my dashboard, however I wanted to be able to sort the widget content by multiple columns.

By default the filter only sorts on a single column, however you can add a second sort by using Atlassian query language syntax like so:

assignee = afore AND resolution = Unresolved ORDER BY priority DESC, updatedDate DESC

jira-filter-jql-sort_20180918_162625-8354860 example of the filter after applying the new sort order

Creating a firewalld service for Plex Media Server – the foremind

plex_firewalld-4644233I recently rebuilt my Plex Media Server box as a CentOS 7 VM running on Hyper-V on a Windows Server 2012 setup.

When I installed the rpm and started the service I found that I was unable to load the interface on my desktop. I knew that it was running because I installed netstat and I was able to see the port was open for traffic and I was also able to load the interface locally in lynx on the server.

UPDATE: At some point I rebuilt my server and I came back to this post to grab my config.  It turns out that I had a typo in one place and a missing command in another.  I have edited this post to correct the issues.  I have followed the new steps on several machines and this process does work without adding additional files in: [code]/usr/lib/firewalld/services/[/code]

It turns out that there were two issues:

Disabling SELinux was as simple as editing the configuration file (/etc/selinux/config) and setting the value of selinux to disabled.

Dealing with firewalld was also initially simple as well:

[code language=”bash”]# systemctl stop firewalld[/code]

The problem with this approach is that I was completely disabling my server’s software firewall. The proper approach would be to create a ruleset that allows for the various ports of Plex Media Server to be open in my server’s active firewalld zone.

Fortunately this is relatively easy to accomplish:

  1. Create the new service configuration file in the services directory
    [code language=”bash”]# vi /etc/firewalld/services/plexmediaserver.xml[/code]
  2. Next add the ruleset using the XML format established for firewalld rules[code language=”xml”] plexmediaserver Plex TV Media Server

    [/code]

  3. Save the service file
  4. Reload the firewalld configs [code language=”bash”]# firewall-cmd –reload

    success[/code]

  5. Add the service to your active zone (by default it is the public zone, but I have changed my default zone to be the home zone)
  6. [code language=”bash”]# firewall-cmd –permanent –zone=public –add-service=plexmediaserver
    success[/code]
  7. Restart the firewalld service[code language=”bash”]# systemctl restart firewalld.service[/code]
  8. You can get the defined service list from firewalld as follows: [code language=”bash”]# firewall-cmd –get-services

    RH-Satellite-6 amanda-client bacula bacula-client dhcp dhcpv6 dhcpv6-client dns freeipa-ldap freeipa-ldaps freeipa-replication ftp high-availability http https imaps ipp ipp-client ipsec iscsi-target kerberos kpasswd ldap ldaps libvirt libvirt-tls mdns mountd ms-wbt mysql nfs ntp openvpn plexmediaserver pmcd pmproxy pmwebapi pmwebapis pop3s postgresql proxy-dhcp radius rpc-bind rsyncd samba samba-client smtp ssh telnet tftp tftp-client transmission-client vdsm vnc-server wbem-https[/code]

Now that this is done you should be able to hit the Plex Media Server web interface from a web browser on any other machine in your network.

March 18, 2015 – the foremind

January 8, 2017March 18, 2015 by Andrew Fore password-5446569

In many cases your enterprise Active Directory will not involve too many domains, in fact it is quite common for an Active Directory implementation to only include one domain.  In some cases, however, when you have the unfortunate situation of having a username in multliple domains with differing policies on password expiration it is useful to be able to know when your password, or that of another user will expire.  Here is an easy way to accomplish this from the command line.

For the current active user

[code language=”bash”] net user /domain

[/code]

For a different user

[code language=”bash”] net user /domain _username_here_

[/code]

Here is an example of the output:

[code language=”bash”] User name afore Full Name Andrew Fore Comment User’s comment Country code 000 (System Default) Account active Yes

Account expires Never

Password last set 1/29/2015 4:38:37 PM Password expires 4/29/2015 4:38:37 PM Password changeable 1/29/2015 4:38:37 PM Password required Yes

User may change password Yes

Workstations allowed All Logon script User profile Home directory

Last logon 3/18/2015 3:27:55 PM

Logon hours allowed All

Local Group Memberships Global Group memberships *VMWare Admins *Domain Users *Staff

[/code]

If you notice there is a lot of useful information regarding the user account here, but of particular interest in my situation was the value of Password expires since I was trying to ensure that I got my password reset prior to the policy setting so that I would not find myself locked out over the weekend that I went on call when the Helpdesk would be closed.

Categories Uncategorized Tags Security, Uncategorized, Windows Leave a comment