Ad 1. For bash, there is a HISTFILE env var, that is usually set to ~/.bash_history, and thus is kept separate for each user. It sounds like your history file is shared among users...
Ad 2. I don't have a specific way of how to accomplish this fine granularity of logging, but some ideas that you could further follow:
- Try to set up ~/.bash_logout to append $HISTFILE to some global history file.
- Set up a trap (in e.g. /etc/profile) that gets executed when user logs out and harvest history this way:
- use 'w' command to get an idea of who's logged in and what they are doing, from cron
Disabling erasing of history -- first I though that could be done through /etc/sudoers, but history is a builtin....
Sorry I am not of more help, but I thought I might help with some brainstorming...
Hmm... It seems that HISTFILE is set to ~/.bash_history, as by default.
And you are saying that all users can see each other's history? Can you please double check on this?
I mean, since root's history file is /root/.bash_history, no other user has read permissions for that.
Can you please log in as a non-root user and post the output of
for this user.
I got conclusion for that deleting history.The output shown for root user like this & other user can't view this $cat /root/.bash_history
#1311599934
ls
#1311602542
ifconfig
#1311602545
export HISTTIMEFORMAT='%F %T '
#1311602549
history
#1311602595
vim /home/admin1/.bash_history
#1311602604
cat /home/admin1/.bash_history
#1311602876
history -a
----
One more doubt
i already export the history format is export HISTTIMEFORMAT='%F %T '[with date & month] & i got the output like this
1019 2011-07-25 19:41:47 cat /root/.bash_history
1020 2011-07-25 19:42:29 echo $HISTFILE
1021 2011-07-25 19:48:48 cat /root/.bash_history
1022 2011-07-25 19:51:52 history
-----
what is my doubt is any possible to view the other user access with date through history.I tried to view particular user access like admin1 for cat /home/admin1/.bash_history .It shown output like this only
mkdir test1
#1311603452
ls
#1311603457
mkdir testnew
#1311603465
cd /var/backup/
#1311603470
mkdir demo
#1311603501
>> But unable to view date & time.please guide this
Dear All
Please how can I create a user which would be only able to manage queue printer like creating, release, hold etc a printer queue. He would for example be able to enter commands like :
- lpstat -pprintqueue where printqueue is an existing queue on the server
- enable printqueue... (0 Replies)
hi frnds
I created sparse root zone, in that zone when i try to change the passwd it is giving permission denied.
what is the reason and how to chnage the root passwd in the zone. can u please explain the query. (4 Replies)
hi '
i am creating a primary group and a secondary group for a user.
#groupadd -g 101 test
#groupadd -g 102 test1
#useradd -d /export/home/user1 -m -s /bin/ksh -g test -G test user1
in /etc/passwd i can find the username as user1 and group name as test
and where can i find the... (4 Replies)
I have an application that runs on Unix and the user administration is managed at a Unix level. The application has an application ID which is linked to the user ids which are created at Unix level. Can you please help if I can be able to track which user used the Application ID and what action was... (0 Replies)
Hello, I inhearited several solaris machines (read that about 30 of them) and have a need to be able to manage the user accounts remotely.... Currently the machines all have the same users but not exactly the same spelling (each machine was locally managed before and thus every single passwd/shadow... (2 Replies)