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!!