Permission denied

I created a user so that when he logs in he will be directed to a menu

/etc/passwd
user1:x:115:1:Support -SysAd:/export/home/user1:/export/home/suppotrmenu/script.sh

However when I logged in remotely from another server by ssh user1@1.1.1.1 , it saysexport/home/suppotrmenu/script.sh: Permission denied.

Why is that when all permissions of script.sh are granted? If I su - user1 directly on 1.1.1.1 via root it says no shell.

Fix which Shell should be used (example : /usr/bin/ksh ... or whatever fits with your system)

Then maybe you can put that

/export/home/suppotrmenu/script.sh

in the $HOME/.profile or in the $HOME/.login (or whatever start file is launched) by your user.

thansk for the answer..I already did that however when I press X (exit) on the menu script, the user should be logged out on the server..Instead it goes back to his shell if i wil do the above.pls advise

What is your requirements exactly ? give a limited access to a user ?

Hello lhareigh890:

You neglected to state which operating system you're using. On the platforms I use, to be a valid login shell an executable must be listed in /etc/shells.

---------- Post updated at 10:08 AM ---------- Previous update was at 09:53 AM ----------

Actually, I don't think either login or ssh consult /etc/shells, but I'll leave its mention there in case it's helpful in some way.

Also, bear in mind that to be able to execute a file, you not only need execute permission on the file, but execute (aka search) permission on every directory in its path.

Regards,
Alister