Specialty Forums
Security and Virus
General Hardware
CPUs/Overclocking
Networking
Digital Photo/Video
Office Software
PC Gaming
Console Gaming
Programming
Database
Web Development
Digital Home

General Forums
Windows XP
Windows Vista
Windows 95/98
Windows Me
Windows NT
Windows 2000
Win Server 2008
Win Server 2003
Windows 3.1
Linux
PDAs
BeOS
Novell Netware
OpenVMS
Solaris
Disk Op. System
Unix
Mac
OS/2

Drivers
Driver Scan
Driver Forum

Software
Automatic Updates

BIOS Updates

My Computing.Net

Solution Center

Free IT eBook

Howtos

Site Search

Message Find

RSS Feeds

Install Guides

Data Recovery

About

Home
Reply to Message Icon Go to Main Page Icon

Unable to set PS1 prompt - AIX - su

Original Message
Name: Rashmi Vinay
Date: June 20, 2007 at 01:31:01 Pacific
Subject: Unable to set PS1 prompt - AIX - su
OS: AIX
CPU/Ram: 512MB
Model/Manufacturer: AIX 5.2, 5.3
Comment:
Hi all,

I was unable to set PS1 environment variable (prompt) to a customised one when I logged into an AIX box with normal user credentials and then switched over to the root user credentials via a perl script
which uses Net::Telnet (CPAN) module. Sourcing the script and changing the .profile file solutions provided on the net was not helpful as I was not allowed to do any modifications with respect to settings on the box. So, I found a way where I could accomplish this.


My Solution: While switching over to other user (say root) which is accomplished through su command, we can send required flags and as well the command to be exceuted. So, I could do it in the following manner:

su - root -ip -a -c env;PS1='customized
one';PS1;

where:
-ip: interactive and privileged
-a: export all the subsequent parameters (here it is PS1)
-c: run the command specified as a string following it


Hope this solution could help any one who would encounter similar kind of a problem in the near future.


Regards,
Rashmi Vinay

Determination Dedication & Hard Work -key points to success


Report Offensive Message For Removal





Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Unable to set PS1 prompt - AIX - su

Comments:

 
  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 


Data Recovery Software




DSHUB24 Connection Problems

need help with dsl and dial up

novel 3.12

help mandriva install last straw!

Icon Scaling in Explorer Bar


The information on Computing.Net is the opinions of its users. Such opinions may not be accurate and they are to be used at your own risk. Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE

All content ©1996-2007 Computing.Net, LLC