Account Info Script

Had to do a quick crontab job at work to grab user details out of /etc/passwd and email the details in a report, here is the resulting script

#!/bin/bash
> account-report.txt
date > account-report.txt
echo -e "=== Account Report ===\n" >> account-report.txt
Nlist=${1:-nodelist.txt}
hName=( $(awk '{print $1}' $Nlist) );
for name in "${hName[@]}"; do

        users=$(cat <<EOL
                cat /etc/passwd | grep "/bin/bash" | grep "[1-9][0-9][0-9]" | cut -d: --fields=1,5

EOL
)
        echo "Host: $name" >> account-report.txt
        ssh -o StrictHostKeyChecking=no ${name} "$users" >> account-report.txt
        echo -e "End of $name accounts\n\n" >> account-report.txt
done

mailx -s "Monthly Account Report" user@host.tld < account-report.txt

It grabs a list of hostnames from nodelist.txt and utilizes a ssh key-trust to connect to the hosts without supplying a password.  We lucked out bigtime that there was a trust already setup otherwise the whole process would have been overly complicated requesting permission to setup a trust in the first place.

Score!

http://www.cnn.com/2013/04/17/politics/senate-guns-vote/index.html?hpt=hp_c2

I hope Senator Feinstein cries her self to sleep tonight and Obama drinks himself to sleep, for once congress actually gets it right!

Round Two, Videogames!

So it seems that Senator Feinstein of AWB fame has decided that since she lacks the power to brow-beat people into passing blatantly unconstitutional laws such as her proposed Assault Weapon Ban that now she needs to take on imaginary guns.

Feinstein said that video games play, “a very negative role for young people, and the industry ought to take note of that.”

“If Sandy Hook doesn’t do it … then maybe we have to proceed, but that is in the future,” she added.

From Huffington Post

Does this woman ever stop to even think about the words that come out of her mouth? does she realize how blatantly fucking authoritarian she sounds when she outright threatens people to do what she wants or she will use her power in congress to come after them? If anybody currently serving is an example of why we need term limits on all of congress she is, she has been a senator since 1992 and despite her radical proposals and often unpopular crusades she keeps getting voted an additional term.

Ban All Assault Knives!

In case you are wondering about the title, its the only response that we should have to the following story:

15 Injured in Texas college stabbing

Obviously we need legislation to ban knives of all shapes and sizes, serrated knives, semi-auto knives, high-capacity knife-storing kitchen blocks, etc.  Seriously if you are reading this and happen to be anti-gun do us all a favor and press for bans on all knives, please.  Whats good for the goose is obviously good for the gander so naturally now we need emotional pleas on the evening news asking why we have allowed the proliferation of these terrible implements which have no purpose other than to cut and kill, because if you don’t then you are a fucking hypocrite.

Where did the years go?

So I was stumbling around the internet at work just checking out old stuff and I came across a friend’s website from back in 2003, you know before the word social media was popular? It made me realize I haven’t really had much in the way of contact with a lot of people over the past half year or so since I deleted my accounts and some it has been much longer.  It got me to thinking that since I really started working in IT I have become drastically less social overall, even when I was using Facebook on a daily basis.  I had thought by leaving social media that I might be encouraged to be more social and connect with people I haven’t talked to in a long time but turns out was just the opposite; now I have even less contact than I did before.

I could chalk this change up to the after-effects of a prolonged period of using social media but ultimately I think this is just the byproduct of a full time job that has two hours of commuting attached to every 10 hour shift I work.  I just don’t have the mental energy to drive to spend time with people; most of my time off is spent running errands or doing tasks I can’t accomplish on days I work.  Its certainly depressing to not remember the last time you heard the voice of people you once considered your best friends, realize you haven’t seen people in the better part of a decade that you used to see on a weekly basis.  It might be the natural progression of things or the price paid for a good job in the field but either way it leaves me with a melancholy taste in my mouth and a longing for the past when everything was simpler.

You are a mobile sensor package!

“You are aware of the fact that somebody can know where you are at all times, because you carry a mobile device, even if that mobile device is turned off,” he said. “You know this, I hope? Yes? Well, you should.”

Source: http://www.huffingtonpost.com/2013/03/20/cia-gus-hunt-big-data_n_2917842.html

That is a quote from the chief technical officer for the Central Intelligence Agency regarding the electronic devices we all carry around.  If there was ever anything that creeped me out enough to consider throwing away my cell phone and turning my iPad into a modern art sculpture using a blow torch this would definitely be it.  I don’t want these freaks tracking my every move, its bad enough I have to carry around a cell phone and laptop essentially 24×7 when I am on-call for work, but the idea of some giant server computing all of my whereabouts and possibly making decisions that could directly impact me based on that data is disturbing.

 

Achievements to be unlocked?

So at work we have to set a batch of goals ever year that we work towards achieving, however this year it seems they are actually going to make us do this.  We have to accomplish these goals under penalty of losing our bonuses.  Two of my goals are going to drive me nuts, the fist being that I must complete the Portal project where I have to develop a set of internal tools.  We are going soft launch by the beginning of March so I’m under retarded levels of pressure to produce working code at an astronomical rate.

Then comes the part where they financially knee-cap me and make my brain implode all at once; I have to take and pass my RHCSA before the end of the year.  What makes this a pain in the ass is that the company wont pay a single cent towards this since they don’t pay for certs, only coursework done at accredited colleges (see also: CCNA).  Last I priced them a single sitting for the RHCSA is 400$ and its a multiple hour long test (that I will probably have to burn personal time to take in the first place).  To make this even more fun I have to study for this in-between doing my normal duties and coding half of a fairly complex project in which there is no set-in-stone list of features to work on, just a starting list that is subject to change from one week to the next.

To make the turd sandwich slide down just a little bit easier they are trying to wash it down with a 6% raise, but I would almost prefer being given more hours in each day so I have room for code, normal work, studying and still be able to get a decent nights rest, but sadly common sense at work aint that common.

Why Me?

I’ve been spending the past few weeks working with the Yii framework to develop some tools for work that may be adopted organization wide and so far all I can say is that once this shit is done I will never write another fucking line of code in my entire life; I don’t see how people do this shit fro a living honestly.  Every week its been an uphill battle to not wipe out my entire code base, lock my laptop and just walk out the damn door, I am supposed to be maintaining Linux and Unix systems yet I spend the majority of each day reading documentation on code, mangling SQL queries and beating PHP code that barely passes as human legible into shapes that are supposed to resemble actual things.

So full of shit

Gun owners won’t be forgotten in debate, Obama says

“I have a profound respect for the traditions of hunting that trace back in this country for generations,” he said. “And I think those who dismiss that out of hand make a big mistake.”

The 2nd Amendment, which Sen Feinstein’s AWB (S. 150) will directly infringe upon, has absolutely nothing to do with the hunting and everything to do with the following quote.

We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable Rights, that among these are Life, Liberty and the pursuit of Happiness.–That to secure these rights, Governments are instituted among Men, deriving their just powers from the consent of the governed, –That whenever any Form of Government becomes destructive of these ends, it is the Right of the People to alter or to abolish it, and to institute new Government, laying its foundation on such principles and organizing its powers in such form, as to them shall seem most likely to effect their Safety and Happiness. Prudence, indeed, will dictate that Governments long established should not be changed for light and transient causes; and accordingly all experience hath shewn, that mankind are more disposed to suffer, while evils are sufferable, than to right themselves by abolishing the forms to which they are accustomed. But when a long train of abuses and usurpations, pursuing invariably the same Object evinces a design to reduce them under absolute Despotism, it is their right, it is their duty, to throw off such Government, and to provide new Guards for their future security.–Such has been the patient sufferance of these Colonies; and such is now the necessity which constrains them to alter their former Systems of Government. The history of the present King of Great Britain is a history of repeated injuries and usurpations, all having in direct object the establishment of an absolute Tyranny over these States. To prove this, let Facts be submitted to a candid world.

Make no mistake about it the end goal here is the total destruction of the 2nd Amendment which is the last line of defense against total domination of the people by the federal government.  Registration (such as the SAFE act in New York) is one of the big things the anti crowd has consistently pushed for and is without a shadow of a doubt a doorway to confiscation.  And to think people actually believed the bullshit he claimed about not being out to take away people’s guns prior to his first term, just goes to show you that no matter what people claim they almost always toe  the party line.