nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

Allow non-root to view system logs?

This is a discussion on Allow non-root to view system logs? within the Networking, Firewalls and Security forums, part of the Mastering Servers category; Is there a way to give just view permissions to non-root users to the system logs? I have web developers ...


Go Back   nixCraft Linux Forum > Mastering Servers > Networking, Firewalls and Security

Linux answers from nixCraft.


Networking, Firewalls and Security No it's not a secret. Talk about firewalls and security issues.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-19-2008, 08:11 PM
Junior Member
User
 
Join Date: Nov 2008
OS: RHEL
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
Dino is on a distinguished road
Default Allow non-root to view system logs?

Is there a way to give just view permissions to non-root users to the system logs? I have web developers who want to view the logs but I don't want them to have the ability to change them.

thanks
Reply With Quote
  #2 (permalink)  
Old 11-19-2008, 10:45 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,697
Thanks: 11
Thanked 243 Times in 183 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Use sudo to give access. For example give tom user permission to view /var/log/scripts.log file
Code:
tom  localhost=/bin/grep /var/log/scripts.log
Use visudo command to add above line. To run above command tom has to type following at a shell prompt:
Code:
 sudo /bin/grep /var/log/scripts.log
Tom need to supply his password in order run tail command.

See
Allow a normal user to run commands as root under Linux / UNIX operating systems
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
  #3 (permalink)  
Old 11-20-2008, 01:41 AM
Junior Member
User
 
Join Date: Nov 2008
OS: RHEL
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
Dino is on a distinguished road
Default

Thank you for the reply, Hadn’t even thought of the tail command, was using vi with sudo.

Are there other viewers available that could be used to scroll thru the entire log?
Reply With Quote
  #4 (permalink)  
Old 11-21-2008, 12:59 AM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,697
Thanks: 11
Thanked 243 Times in 183 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

less is much better and works great. It has search and other useful options:
Code:
man less
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
The Following User Says Thank You to nixcraft For This Useful Post:
Dino (07-07-2009)
  #5 (permalink)  
Old 11-21-2008, 02:57 AM
Junior Member
User
 
Join Date: Nov 2008
OS: RHEL
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
Dino is on a distinguished road
Default

That is exactly what I needed.

Thank you for your help
Reply With Quote
Reply

Tags
linux , root user , sudo


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
windows server 2003 as a host system for LINUX guest system VPS h@foorsa.biz Web servers 3 11-15-2008 10:13 AM
How to view server logs in Ubuntu server enochalbert Ubuntu / Debian 1 10-24-2008 08:43 PM
any way to view view ALL members of a group? guzenkov Ubuntu / Debian 8 05-19-2008 02:21 AM
CVS logs how to rajuk Linux software 1 12-14-2006 04:44 PM
I forgot my root password, how do I get into my system? toor Linux software 2 07-06-2006 11:59 AM


All times are GMT +5.5. The time now is 12:06 PM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2009 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38