LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-01-2016, 10:48 AM   #1
chenjimjc
LQ Newbie
 
Registered: Feb 2016
Posts: 2

Rep: Reputation: Disabled
How not to log one particular user in /var/log/wtmp


Hi,

I have a service account that logs into my server from another server frequently. They are legit logins. When I use the 'last' command, I see all the logins. But I don't want to log the logins for this particular service account (and only this service account). Is there a way to do this? I am running Red Hat 6.x and CentOS 6.x.

Of course I can use 'last |grep -v theServiceAccount' to exclude it when using the 'last' command. But I do not want to log the logins at all.

Thanks
Jim
 
Old 02-01-2016, 11:17 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,622

Rep: Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964
Quote:
Originally Posted by chenjimjc View Post
Hi,
I have a service account that logs into my server from another server frequently. They are legit logins. When I use the 'last' command, I see all the logins. But I don't want to log the logins for this particular service account (and only this service account). Is there a way to do this? I am running Red Hat 6.x and CentOS 6.x.

Of course I can use 'last |grep -v theServiceAccount' to exclude it when using the 'last' command. But I do not want to log the logins at all.
What are you trying to accomplish by doing this?? As far as I know, there is no way to circumvent such things.

Logging legitimate user activity should be something you want, and if you're using the data for something else, and you don't want the clutter, you can easily delete the lines you don't want with sed/grep.
 
Old 02-01-2016, 11:47 AM   #3
chenjimjc
LQ Newbie
 
Registered: Feb 2016
Posts: 2

Original Poster
Rep: Reputation: Disabled
TBOne,

Thanks you for your reply. I just don't want the clutter. Yes, I know I can use the 'grep/sed' to filter the account out.

BTW, I was reading the option '--no-log-init' in useradd. But I don't think this would give me what I want.

Thanks again
Jim
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
/var/log/wtmp mrant Linux - Security 4 07-14-2013 08:41 PM
/var/log/wtmp vs. /var/run/utmp masenko703 Linux - Newbie 4 10-05-2012 03:41 AM
/var/log/wtmp Permissions berzerked Red Hat 3 10-05-2011 02:49 PM
/var/log/wtmp ??? fatrandy13 Linux - Software 3 12-13-2004 09:07 AM
/var/log/wtmp praveenv Linux - Newbie 5 08-23-2004 02:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:05 AM.

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