- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- re: root shell history
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
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
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
06-10-2005 12:34 AM
06-10-2005 12:34 AM
Re: re: root shell history
cut -d: -f1,6 /etc/passwd | grep root
live free or die
harry d brown jr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2005 12:39 AM
06-10-2005 12:39 AM
Re: re: root shell history
(yeah you could "source", but we aren't getting to far to fast)
live free or die
harry d brown jr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2005 12:41 AM
06-10-2005 12:41 AM
Re: re: root shell history
I have checked the /etc/profile file and there is no mention of /home/root in there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2005 12:41 AM
06-10-2005 12:41 AM
Re: re: root shell history
re your comment
3. Your Shell is not posix as it works only in Posix Shell. Confirm by "cat /etc/passwd |grep root". The shall displayed should be /usr/bin/sh in the end of the line.
The root account MUST have /sbin/sh as its shell. You can't use any of the shells in /usr (or in any other filesystem) as that's not mounted if you boot into single user mode. /sbin/sh has built-in versions of commands that other shells source from /usr/bin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2005 12:45 AM
06-10-2005 12:45 AM
Re: re: root shell history
.profile
changes (adding HIST commands) in
/.profile
NOT /home/root/.profile
BUT, it's EASIER if you make them in /etc/profile so that ALL users have this available.
live free or die
harry d brown jr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2005 01:30 AM
06-10-2005 01:30 AM
Re: re: root shell history
making the changes to /.profile instead of /home/root/.profile has had the desired effect.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2005 01:31 AM
06-10-2005 01:31 AM
Re: re: root shell history
set -o vi
to root's .profile?
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2005 01:33 AM
06-10-2005 01:33 AM
Re: re: root shell history
I see a lot of work has gone into working this thread on your behalf. Thats why I like the forums.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2005 01:40 AM
06-10-2005 01:40 AM
Re: re: root shell history
Bye
Paolo
########################################
#
# HISTORY File Creation
#
if [[ ! -d /REPOSITORY/.SH_HISTORY/$LOGNAME ]]
then
mkdir /REPOSITORY/.SH_HISTORY/$LOGNAME
fi
V_numberfield=$(tty | awk ' FS = "/" {print NF}')
if [[ $V_numberfield = 4 ]]
then
V_ttyname=$(tty | awk ' FS = "/" {print $4 }')
V_grep=$(tty | awk ' FS = "/" {print $3"/"$4 }')
else
V_ttyname=$(tty | awk ' FS = "/" {print $3 }')
V_grep=$V_ttyname
fi
HISTFILE=/REPOSITORY/.SH_HISTORY/$LOGNAME/sh_$V_ttyname
export HISTFILE
HISTSIZE=768
export HISTSIZE
if [[ ! -f $HISTFILE ]]
then
cat /dev/null > $HISTFILE
print >> $HISTFILE
fi
date | read -s
print $(who am i -R) | read -s
#############################################
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2005 01:42 AM
06-10-2005 01:42 AM
Re: re: root shell history
Gurch.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2005 02:06 AM
06-10-2005 02:06 AM
Re: re: root shell history
As mentioned, /etc/profile is the correct location for all users. Just be sure that you use export with each variable as in:
export HISTFILE=$HOME/.sh_history
export HISTSIZE=500
export EDITOR=/usr/bin/vi
Bill Hassell, sysadmin
- « Previous
-
- 1
- 2
- Next »