Solaris Reports "su: no shell" During Boot, When Switching Users Using su(1) or on Normal User Login Attempts (Doc ID 1004487.1)

Last updated on JULY 29, 2016

Applies to:

Solaris Operating System - Version 8 6/00 U1 and later
All Platforms

Symptoms

1004487.1: Solaris Reports "su: no shell" During Boot, When Switching Users Using su(1) or on Normal User Login Attempts

During the boot sequence, the system echoes "su: no shell."  At first this seems like a passwd file problem. But after further investigating, it is found that the passwd file was not corrupt and looks good.

The system will report this message when any script that runs su(1) is executed, for example the /etc/rc2.d/S21perf script.

In /etc/rc2.d/S21perf file, the system issues the following:

# Uncomment the following lines to enable system accounting. (Also, see /var/spool/cron/crontabs/sys)
MATCH=`who -r|grep -c "[234][ ]*0[ ]*[S1]"`
if [ ${MATCH} -eq 1]
then
su sys -c "/usr/lib/sa/sadc /var/adm/sa/sa`date +-268441124`"
fi

 

This error message may also be seen when normal users attempt to login to the system or root attempts to switch to that user.  Their logins and the su will fail with an error similar to the following:

# su user1
su: No shell




Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms