- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Script Command
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
тАО09-21-2007 03:00 AM
тАО09-21-2007 03:00 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2007 03:27 AM
тАО09-21-2007 03:27 AM
Re: Script Command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2007 03:33 AM
тАО09-21-2007 03:33 AM
Re: Script Command
its giving
script: illegal option -- q
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2007 03:34 AM
тАО09-21-2007 03:34 AM
Re: Script Command
I would try to run it from an alias to see if the alias is echo'd instead of the script command. Maybe putting the script command at the top of the copyright/motd so it scrolls off the screen. If you just need the shell history maybe 'tee' would be better?
You might also check the porting archive:
http://hpux.cs.utah.edu/
to see if there is a better solution. I would caution you about the use of these type tools to invade users privacy. There should be a pretty good reason for doing something like this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2007 03:35 AM
тАО09-21-2007 03:35 AM
Re: Script Command
sorry there is no -q on hpux, there is on aix
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2007 04:23 AM
тАО09-21-2007 04:23 AM
Re: Script Command
The data is very sensitivie & there are many users who have access to the system.
I tried to change the permission of the dir to root & just give execute permission to the output file. That fails since it should have a write permission for logging activities. Is there any way I can hide the command from getting displayed on the screen wheneve the user logs in. The command is in his .profile so it will execute whenever the user logs in
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2007 05:04 AM
тАО09-21-2007 05:04 AM
Re: Script Command
in profile do something like
if [[ $USER = user ]] ;then
script -a file
clear
fi
copywrite
motd
etc
you could also write to a pipe then create a process that only you can read from it.
using a pipe they wouldn't be able to modify any of the information, but being they would have write permission to the pipe they could feed you bogus information to confuse you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2007 05:09 AM
тАО09-21-2007 05:09 AM
Re: Script Command
stty -echo #turn echoing to the screen off
script -a file
stty echo # turn echoing on
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2007 09:55 PM
тАО09-21-2007 09:55 PM
Re: Script Command
stty -echo
This just turns off echoing of user input, not output in general.
Also, when you use script, I think it won't read any other commands after it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2007 10:32 PM
тАО09-21-2007 10:32 PM
Re: Script Command
- also proposes to run a clear command after script -a
This will neither work, as the clear command won't be executed until the script is terminated (exit or Ctrl+D)
I assume you would need an 'exit' immediately after the script command to ensure that the user simply not exit the script and continous the work in the original login shell
If you want to audit 'what the users do' it might be an option to put a tail on their history file(s). This could run as a continous process from the root user and collect to some audit logfiles.
You will only get their commands - and not all the output (which might be unnecessary anyway).
/Tor-Arne