Skip to content

Instantly share code, notes, and snippets.

@juliandunn
Last active February 21, 2019 20:44
Show Gist options
  • Save juliandunn/5a3fa132c912e0020bc2 to your computer and use it in GitHub Desktop.
Save juliandunn/5a3fa132c912e0020bc2 to your computer and use it in GitHub Desktop.
Script to set up IBM PDP AIX machines
#!/bin/sh
#
# Note: On AIX, /bin/sh is Korn Shell. Don't use Bashisms here!
# Partitions are too small to be useful. Expand them.
chfs -a size=+2000000 /usr
chfs -a size=+2000000 /opt
chfs -a size=+2000000 /home
chfs -a size=+2000000 /var
chfs -a size=+2000000 /tmp
# Limits are too low for comfort. Increase them.
# REMEMBER TO REBOOT THE LPAR AFTER MAKING THESE CHANGES OTHERWISE THEY WON'T TAKE EFFECT!
chsec -f /etc/security/limits -s default -a "rss=-1"
chsec -f /etc/security/limits -s default -a "nofiles=50000"
chsec -f /etc/security/limits -s default -a "data=-1"
chsec -f /etc/security/limits -s default -a "stack=-1"
# Installing sudo is handy; that way you don't need to be root all the time.
rpm -i ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/sudo/sudo-1.6.9p23-2noldap.aix5.3.ppc.rpm
# Let anyone in the staff group (namely, your user ID) run anything as root.
echo '%staff ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
# Remove security.pkcs11 otherwise SSH negotiation may fail
installp -u security.pkcs11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment