![]() |
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 |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to configure ssh for root user....??? | jumadhiya | SUN Solaris | 8 | 06-11-2009 12:34 PM |
| switching user from root to ordinary user | sasia | Shell Programming and Scripting | 3 | 01-25-2008 10:25 PM |
| Want to block ftp for root user | jumadhiya | SUN Solaris | 3 | 02-07-2007 05:01 AM |
| Other than root user .Normal user is unable to create files | mallesh | UNIX for Advanced & Expert Users | 1 | 06-22-2005 12:18 PM |
| root user | hassan2 | UNIX for Advanced & Expert Users | 1 | 05-29-2002 02:15 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
|||||
|
The default shell in Linux as always is bash. I didn't write the script in bash, coz some Unix systems still don't have it. Hence, I prefer to use korn, coz it is standard across Unix. I've to run this script in a fleet of systems, so I don't want to change the shell and profile settings, all I want is that it execute my commnads in korn temporarily. Is there a way to tell what shell I want to use in 'su'.
Thanks for the reply, Nitin |
|
||||
|
Even in unix "su - " do not pass env variables to the new shell... it is just "su"
Code:
To become user bin while retaining your previously exported
environment, execute:
example% su bin
To become user bin but change the environment to what would
be expected if bin had originally logged in, execute:
example% su - bin
In unix it might be loading the correct profile what you wanted but in linux it might be loading some bash profile which don't have correct settings.. compare both profile files in unix and linux |
![]() |
| Bookmarks |
| Tags |
| linux commands |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|