![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| what is the most effective way to process a large logfile? | fedora | Shell Programming and Scripting | 8 | 11-16-2006 09:55 AM |
| Changing the Effective Group ID | Jody | UNIX for Dummies Questions & Answers | 2 | 12-05-2002 03:53 PM |
| most effective search ? | simon2000 | UNIX for Dummies Questions & Answers | 3 | 10-09-2002 10:18 AM |
| Changing effective user | hilmel | Security | 6 | 12-06-2001 04:31 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Variables for Effective Username?
Hey all, I'm glad to have found this forum as I'm trying to dive head first into Solaris 8 - been working with it for a few months now and am finally getting a bit comfortable with the layout and concepts. In any case, on to the questions...
I was wondering how I would go about displaying the Effective Username (for example if I login as user1 initially, then su to root, now my Effective Username is root) in the prompt on the system. Currently $PS1 is set to: '[$LOGNAME : $PWD]$' and I'd like to replace $LOGNAME with their Effective Username so that when one su's to another username you don't forget whether you're still root, etc. Thanks for your input! |
|
||||
|
Cool, thanks auswipe - I had forgotten about the good ol' `command` thing.
Perderabo - So, in theory, if I could test the output of the command `whoami` for root then I could tell it to use a different value for $PS1 (which would include the # rather than the $)? Sounds like I need to read up on some scripting, eh? ![]() Thanks again! |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|