- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: User only can read syslog.log file
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
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
тАО12-04-2008 03:23 PM
тАО12-04-2008 03:23 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-04-2008 03:34 PM
тАО12-04-2008 03:34 PM
Re: User only can read syslog.log file
Have a read around RBAC and Access Control Lists.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-04-2008 05:24 PM
тАО12-04-2008 05:24 PM
Re: User only can read syslog.log file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-04-2008 07:49 PM
тАО12-04-2008 07:49 PM
SolutionThe use can use the login to view the syslog, but the minute he finishes viewing, he is logged out. As log as the syslog does not give users write permission, then they cannot modify. Make sure that the user login you do this for has no permissions to do anything, as a user can escape from a view to a command prompt. You could block this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-04-2008 11:28 PM
тАО12-04-2008 11:28 PM
Re: User only can read syslog.log file
if you want create a role which monitors logs, you can use tools like log readers or you consolide logs to logserver. so user can monitor in more human readable way.
if you want the user login and just read log create a travia shell like /usr/bin/read_log that contains with executable bit set,
vi /var/adm/syslog/syslog.log
create /etc/shells file that contains:
/sbin/sh
/usr/bin/sh
/usr/bin/rsh
/usr/bin/ksh
/usr/bin/rksh
/usr/bin/csh
/usr/bin/keysh
/usr/bin/read_log
change user shell in /etc/passwd file from /sbin/sh to /usr/bin/read_log
hope it helps.
Kenan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-05-2008 10:40 AM
тАО12-05-2008 10:40 AM
Re: User only can read syslog.log file
At the end of users's .profile I added vi /var/adm/syslog/syslog.log
exit
It works fine, user can read the file and when he gets the end of file the user is logged out. However if user do a CTRL - C user can go to promt and can go wherever he wants inside the system. How can I avoid user do this?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-05-2008 07:56 PM
тАО12-05-2008 07:56 PM
Re: User only can read syslog.log file
If you do what Kenan said, that can't happen. You can't type control-C or control-Z.
I suppose you could trap SIGINT.
Or you can simply disable control-C and control-Z:
stty intr ^- susp ^-
(Those are carets.)
Note: You may want to use view vs vi. And either will let the user edit another file and using :shell, he can get a shell.