Computing.Net > Forums > Unix > Solaris 9 and .profile

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Solaris 9 and .profile

Reply to Message Icon

Name: woodson2
Date: November 29, 2006 at 12:00:59 Pacific
OS: Solaris9
CPU/Ram: SParc IV 16GB
Product: SUN/V490
Comment:

I have created a custom nologin shell named nologinksh that looks like this.

#!/bin/ksh

DATE=`date |sed 's/:.. .*//'`
LAST=`last -1 |grep "$LOGNAME.*$DATE"`
if [ "$LAST" ]; then
echo "Remote logon is not permitted."
else
export SHELL=/bin/ksh
. $HOME/.profile
/bin/ksh
fi

The shell is setup so that the user can't log directly into the server but the acount can be "su'd" to and pick up the accounts environment settings. The script sources the users .profile but ignores the aliases in the file. It picks up all the other environment settings except for the aliases. However, once logged in if I manually source the .profile the aliases are picked up. Is there something else I need to add to the script for it to pick up the aliases as well??..I have a similar script for the c-shell and that script is almost identical and it picks up the aliases...Any insight would be greatly appreciated...Thanks..



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Solaris 9 and .profile

x86 Solaris 9.0 NIC driver/naming www.computing.net/answers/unix/x86-solaris-90-nic-drivernaming/6665.html

Samba on Solaris 9 box www.computing.net/answers/unix/samba-on-solaris-9-box/4553.html

Solaris 8 and XP dual-boot www.computing.net/answers/unix/solaris-8-and-xp-dualboot/2790.html