The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > SUN Solaris
Google UNIX.COM


SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Jumpstart "profile" with Solaris 8 vasy SUN Solaris 4 06-10-2008 12:48 AM
Where is the .profile on Solaris 10G annointed3 UNIX for Dummies Questions & Answers 9 03-19-2008 11:09 PM
Difference between .profile and .~/.profile maneesh mehta SCO 3 12-14-2005 12:35 AM
changed .profile but didnt ./.profile, yet reflected changes yls177 UNIX for Dummies Questions & Answers 4 12-05-2002 07:21 AM
editing a profile on solaris 2.3 phpote UNIX for Dummies Questions & Answers 7 08-20-2001 01:16 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-29-2006
Registered User
 

Join Date: Nov 2006
Posts: 1
Solaris 9 and .profile

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..
Reply With Quote
Google UNIX.COM
Forum Sponsor
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:01 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0