Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 04-10-2006, 04:39 AM   #1
LQ Newbie
Registered: Feb 2005
Distribution: Fedora Core 5
Posts: 6

Rep: Reputation: 0
Access log-files without logging in as root

Hi all,

How can I access the log-files as a different user, without actually log in as root? I want to be able to quickly view the logfiles.

Is there something possible like:

cat /var/log/mylog.log as su
Old 04-10-2006, 05:10 AM   #2
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,124

Rep: Reputation: 164Reputation: 164
You can configure sudo and type sudo cat /var/log/mylog.log - or you could do it with su -c 'cat /var/log/mylog.log'

With sudo you'll be prompted for your own password, with su you'll be prompted for root's password.
Old 04-10-2006, 05:28 AM   #3
LQ Newbie
Registered: Feb 2005
Distribution: Fedora Core 5
Posts: 6

Original Poster
Rep: Reputation: 0

Thanks! That's it! So simple!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache 2.0 | logging | Recording the host name in the log files ganz_friedrich Linux - Software 2 02-16-2006 03:06 PM
log file access for 2nd root overlord73 Linux - Security 3 02-14-2006 07:30 AM
Access Denied when trying to log info in files bigdog0007 Linux - Newbie 6 06-28-2005 08:56 AM
need to chmod lots o files, without logging in a root Seribicus Linux - Software 6 02-18-2005 12:29 PM
Squid access.log files davebarnes Linux - Networking 1 10-27-2002 04:05 PM

All times are GMT -5. The time now is 04:30 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration