Configuring a user to use the bash shell on an AIX server

I previously wrote about my experience installing bash on my AIX hosts. After I installed the package I wanted to make bash my default shell. I fired up usermod but was greeted with the following error:

$ usermod -s /usr/bin/bash matty
3004-703 Check “/etc/security/login.cfg” file.
3004-692 Error changing “shell” to “/usr/bin/bash” : Value is invalid.

AIX contains a list of valid shells in /etc/security/login.cfg, and bash is not in that list by default:

shells = /bin/sh,/bin/bsh,/bin/csh,/bin/ksh,/bin/tsh,/bin/ksh93,/usr/bin/sh,/usr/bin/bsh,/usr
/bin/csh,/usr/bin/ksh,/usr/bin/tsh,/usr/bin/ksh93,/usr/bin/rksh,/usr/bin/rksh93,/usr/sbin/uucp/uucico
,/usr/sbin/sliplogin,/usr/sbin/snappd

Once I appended “/usr/bin/bash” to the end of the “shells” line usermod worked without a hitch:

$ usermod -s /usr/bin/bash matty

$ echo $?
0

Rock and roll!!

1 thought on “Configuring a user to use the bash shell on an AIX server”

  1. The problem with that approach is that it is a one-off; you hacked the one of system’s configuration files by hand. This type of approach is also known as “partisan” or “guerilla” or “ad hoc” approach, and is exactly the opposite to planning.

    If you have any interest in doing this correctly, document how to build an AIX LPP package, which automatically adds and removes the bash entry to /etc/shells upon installation and removal, so that folks looking for this information get a demonstration of what it means to perform repeatable system engineering and configuration management, rather than system administration one-off hacking. /etc/shells problem is a well understood one, but planning and designing for consistent reliability – not so much. It’s the difference between a system administrator and a system engineer.

Leave a Reply

Your email address will not be published. Required fields are marked *