Archive for the 'Linux' Category

Listing AWS IAM Permission Names by System

Tuesday, April 18th, 2017

A tiny shell script for listing the AWS IAM permission for a particular system, like “ec2” or “s3”.

Does not handle every possible case, as some URL paths are inconsistent. YMMV.

Example:


lap ~> iam-permissions ec2 | head -5
ec2:AcceptReservedInstancesExchangeQuote
ec2:AcceptVpcPeeringConnection
ec2:AllocateAddress
ec2:AllocateHosts
ec2:AssignPrivateIpAddresses

Script below…

(more…)

Linux: /etc/nslcd.conf gets re-written and LDAP stops working

Thursday, August 15th, 2013

Googlefood. Not interesting to most people.

(more…)

OpenLDAP 2.4: Adding overlays

Sunday, June 2nd, 2013

Mostly googlefood, since I spent way too long looking for this.

(more…)

One-Liner of the day – generate a random password

Tuesday, September 13th, 2011


dd if=/dev/urandom bs=1c count=200 | tr -d '\001-\040\042\047\054\077\134\140\173-\377' && echo

How to find which linux distribution you are running from a shell script

Friday, June 10th, 2011

sed -n -e ‘s/ *(.*)//g’ -e ‘s/ /-/g’ -e ‘1p’ /etc/issue

Examples:

nethead2:$ sed -n -e 's/ *(.*)//g' -e 's/ /-/g' -e '1p' /etc/issue
Scientific-Linux-release-6.0

dhollowa-106$ sed -n -e 's/ *(.*)//g' -e 's/ /-/g' -e '1p' /etc/issue
CentOS-release-5.6