- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: History not working in root user
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
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
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
тАО05-05-2009 01:36 AM
тАО05-05-2009 01:36 AM
For me history command is not working for the root user,in the default shell.but in keysh shell its working,for all other users its working properly.i am working with rx series itanium servers(11iv23 os)
1> how can i enable history?
2> which files i have to modify for the same?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-05-2009 01:39 AM
тАО05-05-2009 01:39 AM
Re: History not working in root user
something like:
HISTFILE=/.sh_history
export HISTFILE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-05-2009 01:50 AM
тАО05-05-2009 01:50 AM
Re: History not working in root user
I'm using this settings.
1, root home directory = .profile
2,
export PS1=`hostname`:'$PWD>'
export HISTFILE=./.sh_history
export HISTSIZE=2048
mikap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-05-2009 01:50 AM
тАО05-05-2009 01:50 AM
Re: History not working in root user
Does history file(/.sh_history) exist?
#ll /.sh_history
What is the output of #echo $HISTFILE?
root user .profile should contain this.
# grep HISTFILE /.profile
HISTFILE=/.sh_history
export HISTFILE PS1
#
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-05-2009 01:55 AM
тАО05-05-2009 01:55 AM
Re: History not working in root user
# ll .sh_history
-rw------- 1 root sys 1042 Sep 18 2008 .sh_history
# cat .sh_history
vgimport -v -m /tmp/vg02.map vg02 /dev/rdsk/c4t0d0 /dev/rdsk/c4t0d1 /dev/rdsk/c4t0d2 /dev/rdsk/c4t0d3 /dev/rdsk/c6t0d0 /dev/rdsk/c6t0d1 /dev/rdsk/c6t0d2 /dev/rdsk/c6t0d3
xpinfo -i
ioscan
insf
insf -e
vgimport -v -m /tmp/vg02.map vg02 /dev/dsk/c4t0d0 /dev/dsk/c4t0d1 /dev/dsk/c4t0d2 /dev/dsk/c4t0d3 /dev/dsk/c6t0d0 /dev/dsk/c6t0d1 /dev/dsk/c6t0d2 /dev/dsk/c6t0d3
vgchange -a y vg02
vgdisplay -v vg02
vgdisplay -v vg02 |more
fsck -y /dev/vg02/u03
horcmstart.sh 01
export HORCMINST=01
pairdisplay -g wgw1 -l
pairsplit =g wgw1 -swapps
pairmodify
pairsplit -g wgw1
pairdisplay -g wgw1
pairsplit -help
pairdisplay -g wgw1 l
pairresync -g wgw1 -swaps
pairdisplay -g wgw1
pairsplit -g wgw1 -l
pairdisplay -g wgw1
mount /dev/vg02/u03 /u03
fsck -y /dev/vg02/u03
fsck -y /dev/vg02/u04
mount /dev/vg02/u03 /u03
mount /dev/vg02/u03 /u04
mount /dev/vg02/u04 /u04
bdf
bdf
bdf
umount /u03
umount /u04
bdf
pairdisplay -g wgw1
export HORINST=01
pairdisplay -g wgw1
bdf
shutdown -hy 0
# history
sh: fc: Cannot access or open the history file.
#
this is the problem i am facing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-05-2009 02:10 AM
тАО05-05-2009 02:10 AM
Re: History not working in root user
Look at the time stamp of .sh_history file.
It is last modified on sept 18 2008.
# ll .sh_history
-rw------- 1 root sys 1042 Sep 18 2008 .sh_history
So some modifications has been done on root's .profile which is pointing to some other history file.
Could you provide the following outputs?
#echo $HISTFILE
#grep HISTFILE /.profile
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-05-2009 02:19 AM
тАО05-05-2009 02:19 AM
Re: History not working in root user
the output of the above script is
# grep HISTFILE /.profile --->no o/p for this
# echo $HISTFILE
sh: HISTFILE: Parameter not setutput of the above files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-05-2009 02:26 AM
тАО05-05-2009 02:26 AM
Re: History not working in root user
i have one question, how do you log to the system, directly as root or you as some other user and them you make su - ( or just only su ??? )
mikap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-05-2009 02:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-05-2009 02:36 AM
тАО05-05-2009 02:36 AM
Re: History not working in root user
Thanks for your help the actual problem was the one you mentioned thanks a lot.