- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Documentation of standards for 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
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
03-22-2006 05:50 AM
03-22-2006 05:50 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2006 05:58 AM
03-22-2006 05:58 AM
Re: Documentation of standards for root user
Well, the *last* thing you want to do is have multiple superuser accounts!
Consider what happens if we defined user=john with a UID=0. Now, one day you leave the organization and user=susie takes over. She decides to remove your account and all its files, so she does:
# find / -user john | xargs rm -rf
...well, "john" is uid=0, so Susie just removed all files and directories owned by root!
One better choice is to limit root logins to the console (via '/etc/securetty' as described in the manpages for 'login') and force all users to login as themselves and then 'su' to root.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2006 06:05 AM
03-22-2006 06:05 AM
SolutionYou are better off with nobody using the UID zero account and only have one of them.
You can use sudo to provide needed functionality to these persons individual user accounts.
The system proposed by your auditor provides the opposite of accountability. Anybody with user id zero can do what they wish, erase a few log files and there is no accountability at all.
The bottom line is you must trust those users with user id equal to zero, at least to some degree.
Saying that, the practice here is to do what the auditor says. The .sh_history file is kept only for a short time.
I think however this is what you really want to see:
SOX rules
http://wp.bitpipe.com/resource/org_982350567_190/9086_UNIX_Linux_edp.pdf?site_cd=sel&src=bpde_sel_topics
http://www.s4software.com/sup_gdfaq.htm
http://www.passgo.com/datasheets/compliance/Sarbanes_Oxley.pdf
There is more.
Bottom line, I think your auditor is wrong. Management hired you permanently, speak with them and perhaps they'll make her go away on this issue.
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
03-22-2006 06:14 AM
03-22-2006 06:14 AM
Re: Documentation of standards for root user
If they want some more accountability, the sulog will give info as to who became root. You can install the rootsh utility and in conjunction with sudo you will get all the information you need for the auditors.
Note, not to be offensive to anybody, myexperience with auditors is that they have very little knowledge of UNIX systems. What they are requesting is typically outside the bounds of best practices.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2006 06:44 AM
03-22-2006 06:44 AM
Re: Documentation of standards for root user
Management can declare common best practice is acceptable and that her suggestion won't be implemented. Auditors are basically hired to make suggestions. It's up to the business to decide what's viable and reasonable based on their own needs and document those approved deviations the auditors flagged. (Though, if I had any auditor insisting on such a thing as this, I'd express great reservations to management about ever using that firm again.)
Jeff Traigle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2006 09:32 AM
03-22-2006 09:32 AM
Re: Documentation of standards for root user
Thanks SEP for the doc reference. Rick, can you tell me more about what rootsh does, and where I can get it?
Thanks much all of you.
I'm still looking for other documentation too!
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2006 09:39 AM
03-22-2006 09:39 AM
Re: Documentation of standards for root user
Thanks,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2006 09:46 AM
03-22-2006 09:46 AM
Re: Documentation of standards for root user
All of SEP's links worked fine for me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2006 09:58 AM
03-22-2006 09:58 AM
Re: Documentation of standards for root user
#############
# sets .sh_hist file to id of user
if [ "`tty`" = "/dev/console" ]
then
REAL=console
else
REAL=`logname`
fi
HISTFILE=$HOME/.sh_$REAL
export HISTFILE
export HISTSIZE=10000
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2006 03:06 PM
03-22-2006 03:06 PM
Re: Documentation of standards for root user
For root, no direct login (unles console) and set up this in .profile:
# Set up logging
HISTFILE=${HOME}/.sh_history_`who am i|awk '{ print $1}'`
date >>$HISTFILE
export HISTFILE
HISTSIZE=5000
export HISTSIZE
This creates a root history file for each person who su - to root as well as time stamps when they su'ed.
Cron:
# date stamp sh_history
0 0,6,12,18 * * * /usr/local/bin/datestamp-root-history > /tmp/datestamp-root-history.log 2>&1
#!/bin/sh
#
# script to add a date stamp to the /.sh_history_$USER
# for those su'ed to root
# Only run from cron once a day
# gwild 2004-10-15 with help from jkittle
#===================================================================
# initialize some variables
#===================================================================
ULOG=/tmp/datestamp-user.log
cat /dev/null > $ULOG
#===========================================================
# Function: TimeStamp
# Description: timestamp the /.sh_history_$USER
# Arguments: none
# Returns: none
#===========================================================
function TimeStamp {
# point to their .sh_history file
# time stamp it
echo "HISTFILE is $HISTFILE"
(export HISTFILE=${HOME}/.sh_history_$UNIQUSER; echo "HISTFILE is $HISTFILE"; print -s "### `/usr/bin/date` $UNIQUSER still logged in as root...###")
unset HISTFILE
echo "HISTFILE after unset is $HISTFILE"
}
#===================================================================
# BEGIN MAIN CODE
#===================================================================
# find parent process of all users signed in as root
for i in `ps -ef |grep "\-sh"|awk '{print $3}'`
do
# just grab the user name
for USER in `ps -ef |grep $i |grep -v root|awk '{print $1}'`
do
echo $USER >> $ULOG
done
done
# get each user only once
for UNIQUSER in `cat $ULOG |sort|uniq`
do
TimeStamp
done
exit 0
Also see this thread:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=718395&admit=-682735245+1143086677446+28353475
As far as a document - I'll take a look when I get to work in the morning...
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2006 03:18 PM
03-22-2006 03:18 PM
Re: Documentation of standards for root user
please find attached the document at the 2nd link that you are having problems
For the 3rd, try:
http://www.passgo.com/datasheets/compliance/Sarbanes_Oxley.pdf
(note that SEP's url does not come out as display on this page when you click)
hope this helps!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2006 06:21 PM
03-22-2006 06:21 PM
Re: Documentation of standards for root user
My link works just fine for me in firefox. Don't know what to say. Sorry about the trouble.
If you disable direct root logon, you can provide accountablity as follows
H1=$(who am i | awk '{print $1}'
HISTFILE="$H1roothistory"
export HISTFILE
I'm sure it can be done with one command, but have no time to test it.
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
03-23-2006 01:29 AM
03-23-2006 01:29 AM
Re: Documentation of standards for root user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2006 01:59 AM
03-23-2006 01:59 AM
Re: Documentation of standards for root user
Additional info on this thread.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=945592
The source depot for HPUX is at http://sourceforge.net/project/showfiles.php?group_id=110309&package_id=125148
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2006 06:19 AM
03-23-2006 06:19 AM
Re: Documentation of standards for root user
The documentation did the trick in the meeting with the auditor.
Thanks all for the help (what a great bunch of folks!).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2006 06:19 AM
03-23-2006 06:19 AM