- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: env command not working with root
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-16-2010 12:53 PM
тАО10-16-2010 12:53 PM
With root user when I wish to know the env variable and give command 'env' I am getting the error as below
# env
env: setenv: not found
env[2]: setenv: not found
env[3]: setenv: not found
env[4]: setenv: not found
#
--------------------------------------------
# uname -a
HP-UX hostname B.11.31 U ia64 2308917168 unlimited-user license
-----------------------------------------------
# more /etc/passwd
root:xTJErm.a8LWnc:0:3::/:/usr/bin/ksh
daemon:*:1:5::/:/sbin/sh
bin:*:2:2::/usr/bin:/sbin/sh
sys:*:3:3::/:
adm:*:4:4::/var/adm:/sbin/sh
uucp:*:5:3::/var/spool/uucppublic:/usr/lbin/uucp/uucico
lp:*:9:7::/var/spool/lp:/sbin/sh
nuucp:*:11:11::/var/spool/uucppublic:/usr/lbin/uucp/uucico
hpdb:*:27:1:ALLBASE:/:/sbin/sh
nobody:*:-2:-2::/:
www:*:30:1::/:
smbnull:*:101:101:DO NOT USE OR DELETE - needed by Samba:/var/opt/samba/nologin:/bin/false
cimsrvr:*:102:102:WBEM Services:/var/opt/wbem:/sbin/sh
tftp:*:103:103:Trivial FTP user:/home/tftp:/usr/bin/false
sfmdb:*:104:20::/home/sfmdb:/sbin/sh
sshd:*:105:104:sshd privsep:/var/empty:/bin/false
iwww:*:106:1::/home/iwww:/sbin/sh
owww:*:107:1::/home/owww:/sbin/sh
hpsmh:*:108:105:System Management Homepage:/var/opt/hpsmh:/sbin/sh
-----------------------------------------------
how to set env in HPUX, can someone help me
rgds
jalli
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-16-2010 01:57 PM
тАО10-16-2010 01:57 PM
Re: env command not working with root
Immediately change root's shell back to /sbin/sh! Otherwise you won't be able to reboot the system.
># env
env: setenv: not found
What does "whence -v env" show?
setenv is a scummy C shell command. What is the contents of your "env" script?
You could try /usr/bin/env.
- Tags:
- scummy C shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-16-2010 02:08 PM
тАО10-16-2010 02:08 PM
Re: env command not working with root
here are the outputs.
# whence -v env
env is /usr/bin/env
# ls -l /usr/bin/env
-r-xr-xr-x 1 bin bin 147 Oct 14 15:08 /usr/bin/env
# /usr/bin/env
/usr/bin/env: setenv: not found
/usr/bin/env[2]: setenv: not found
/usr/bin/env[3]: setenv: not found
/usr/bin/env[4]: setenv: not found
---------------------
# more /usr/bin/env
setenv $ORACLE_HOME /oracle/SID/102_64
setenv $ORACLE_SID SID
setenv $ORACLE_STAGE /oracle/SID/stage
setenv $ORACLE_BASE /oracle
SAPSYSTEMNAME=SID
I changed the root shell to /sbin/sh
. . .
rgds
jalli
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-16-2010 02:30 PM
тАО10-16-2010 02:30 PM
Solution-r-xr-xr-x 1 bin bin 147 Oct 14 15:08 /usr/bin/env
# /usr/bin/env
/usr/bin/env: setenv: not found
root has destroyed the env(1) command. Do you have a backup? Or another machine you can get it from?
# more /usr/bin/env
setenv $ORACLE_HOME /oracle/SID/102_64
This csh script fragment should have been put elsewhere.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-16-2010 02:43 PM
тАО10-16-2010 02:43 PM
Re: env command not working with root
Let me try to get the copy of env from other machine.
where to put the csh strings below:
setenv $ORACLE_HOME /oracle/EC6/102_64
setenv $ORACLE_SID EC6
setenv $ORACLE_STAGE /oracle/EC6/stage
setenv $ORACLE_BASE /oracle
SAPSYSTEMNAME=EC6
Will it be fine if we place in .profile of root under '/' ?
thanks you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-16-2010 05:27 PM
тАО10-16-2010 05:27 PM
Re: env command not working with root
For example:
export ORACLE_HOME=/oracle/EC6/102_64
export ORACLE_SID=EC6
export ORACLE_STAGE=/oracle/EC6/stage
export ORACLE_BASE=/oracle
export SAPSYSTEMNAME=EC6
You can put the above statements in roots .profile file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-17-2010 11:18 PM
тАО10-17-2010 11:18 PM
Re: env command not working with root
Yes Dennis is absolutely right.
I copied the env file from other machine (copied in binary mode)
and it is working fine.
Thank you guys and thanks to forum, as well.
Regards
Jalli