The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to script to logon servers using id and password razeeev Shell Programming and Scripting 1 01-05-2008 11:30 PM
UNIX logon script/batch oht UNIX for Dummies Questions & Answers 1 09-05-2007 06:04 PM
About Logon nokia1100 Shell Programming and Scripting 1 04-05-2007 07:21 AM
umask setting on a logon script karthikosu AIX 2 06-22-2006 12:38 PM
Can't logon SRP UNIX for Dummies Questions & Answers 8 11-24-2003 05:04 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-05-2006
capeme capeme is offline
Registered User
  
 

Join Date: Oct 2006
Posts: 25
Logon script

Hi:
I am wondering if anyone has a logon script to be put in /etc/profile or environments that will display the logged on username and path?
  #2 (permalink)  
Old 12-05-2006
Darwin_ Darwin_ is offline
Registered User
  
 

Join Date: Dec 2006
Posts: 23
echo "$USER" # shows username
echo "$(pwd)" # shows current work dir

but I'm not quite sure if thats what you've been looking for.

Darwin
  #3 (permalink)  
Old 12-05-2006
kapilraj kapilraj is offline
Registered User
  
 

Join Date: Dec 2006
Location: Maryland
Posts: 162
Edit /etc/profile and add the following there

n_name=`whoami`
n_date=`date +%m%d%y`

banner ${n_name} ${n_date}

Why do you need to do this ?
  #4 (permalink)  
Old 12-06-2006
capeme capeme is offline
Registered User
  
 

Join Date: Oct 2006
Posts: 25
I just wnated to show the user logged in and thier path.

Thanks all.
  #5 (permalink)  
Old 12-06-2006
cero cero is offline
Registered User
  
 

Join Date: Aug 2006
Posts: 56
Be careful with the path (in case it's the $PATH variable you'd like to display). /etc/profile is executed before the personal ~/.profile (where PATH usually is altered to fit the users needs) , so the value you display may not be the one the user actually uses.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:58 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0