LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-06-2019, 07:43 AM   #1
EHSANLINUX
LQ Newbie
 
Registered: Sep 2018
Distribution: Centos
Posts: 13

Rep: Reputation: Disabled
Question Monitor root user activity


I know logging in with root is not recommended but i have to find solution that which sysadmins log in with root and change configuration
 
Old 10-06-2019, 08:19 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,879

Rep: Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317
did you check the command last already?
 
Old 10-06-2019, 08:29 AM   #3
EHSANLINUX
LQ Newbie
 
Registered: Sep 2018
Distribution: Centos
Posts: 13

Original Poster
Rep: Reputation: Disabled
tracking root activity

yes but does not helpful for that situation
imagine we have 3 users that are sysadmin,every sysadmin log in with root and change something or modify configuration or anything,i want to find out each modification for which sysadmin user
 
Old 10-06-2019, 09:29 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,646

Rep: Reputation: 7969Reputation: 7969Reputation: 7969Reputation: 7969Reputation: 7969Reputation: 7969Reputation: 7969Reputation: 7969Reputation: 7969Reputation: 7969Reputation: 7969
Quote:
Originally Posted by EHSANLINUX View Post
yes but does not helpful for that situation
imagine we have 3 users that are sysadmin,every sysadmin log in with root and change something or modify configuration or anything,i want to find out each modification for which sysadmin user
Think about what you just wrote. If all three people log in as the same user ID (root), then how, exactly, do you think you can tell them apart? Again, logging in as root on ANYTHING but the console is a horribly bad idea, and there is *NO REASON* to do this, at all, ever. Your sysadmins can log in as their regular users, then use sudo or su to get root privileges as needed. You can then look at command history, times/dates of logins, etc., to see who did what. You can ALSO (better) change the root password to something that only YOU know, and let them use SUDO...which will log every command back to their user ID's. They can do anything, but everything will be logged.

And nothing you do is going to have any impact on anything, since (if you have root access), you can wipe out ANY trace of anything you did, leaving you as much in the dark as you are now. Either hire admins you trust, or get rid of ones you don't.
 
Old 10-06-2019, 09:37 AM   #5
EHSANLINUX
LQ Newbie
 
Registered: Sep 2018
Distribution: Centos
Posts: 13

Original Poster
Rep: Reputation: Disabled
tracking root activity

Yes i know but i have to find or make an architecture that monitors root activity
using sudo and wheel group is recommended by red hat official books and i know root user can do anything
 
Old 10-06-2019, 09:52 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,646

Rep: Reputation: 7969Reputation: 7969Reputation: 7969Reputation: 7969Reputation: 7969Reputation: 7969Reputation: 7969Reputation: 7969Reputation: 7969Reputation: 7969Reputation: 7969
Quote:
Originally Posted by EHSANLINUX View Post
Yes i know but i have to find or make an architecture that monitors root activity using sudo and wheel group is recommended by red hat official books and i know root user can do anything
Again: **ONCE YOU HAVE ROOT, YOU CAN DO ANYTHING**. This includes (AGAIN) erasing any traces of whatever you did. In short, you CANNOT DO what you're asking to do, period. Again, you restrict access to root ONLY to the system console, period...you DO NOT log in as root over the network. You keep the root password to yourself, and put any other admins in the wheel group, and grant them sudo access. You now have ANY root level commands run tied to a specific user ID, which is what you want.

If you want to be secure, you limit what those users can do; make sure they can't change the root password, remove/edit wtmp or history/logs for sudo, etc. They then can't erase traces of what they did. More secure? Then mirror your logs to a centralized syslog server, which no one but you has access to.

This is sounding very much like a homework question.
 
Old 10-06-2019, 10:06 AM   #7
EHSANLINUX
LQ Newbie
 
Registered: Sep 2018
Distribution: Centos
Posts: 13

Original Poster
Rep: Reputation: Disabled
tracking root activity

AGAIN I KNOW YOUR INTENTION but i have to make an architecture for this situation because of CEO requests this situation
I don't care my problems sounds what,I only wanna to solve problem
 
Old 10-06-2019, 10:37 AM   #8
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,879

Rep: Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317
but you need to understand how it works.
We cannot make an architecture for you, we can only help you to solve your problem.
At first you must not give root account to anyone. Next, you [may] need to configure sudo to allow some people to execute some apps. That can be logged easily.
But you - and again, nobody - can control the root user, because root have the power to do anything, including the modification of the system and removing anything (like logs) - or disabling monitoring.
So the best thing you can do is to do not allow to be root for anyone - but give permissions for specific tasks (with sudo or something similar).

Last edited by pan64; 10-06-2019 at 10:39 AM.
 
2 members found this post helpful.
Old 10-06-2019, 10:39 AM   #9
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,646

Rep: Reputation: 7969Reputation: 7969Reputation: 7969Reputation: 7969Reputation: 7969Reputation: 7969Reputation: 7969Reputation: 7969Reputation: 7969Reputation: 7969Reputation: 7969
Quote:
Originally Posted by EHSANLINUX View Post
AGAIN I KNOW YOUR INTENTION but i have to make an architecture for this situation because of CEO requests this situation I don't care my problems sounds what,I only wanna to solve problem
Then you need to explain to your CEO why what they want is impossible, period. There is no magic solution to do what you want, and there never will be.

And if your company's security practices are so bad that multiple people log in as root over the network, you've got bigger issues to deal with. We know what you want; you are not understanding what you're being told in regards to it, and it can't be explained any simpler. If you truly don't understand why what you're asking is impossible, then you need to give this job to one of your co-workers who does understand it.
 
1 members found this post helpful.
Old 10-07-2019, 10:56 AM   #10
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by EHSANLINUX View Post
I know logging in with root is not recommended but i have to find solution that which sysadmins log in with root and change configuration
Log in as root yourself, change the password, and don't give it to un-trustworthy admins. Done.

Configure permissions for such accounts that allow these other admins to do their work, but not "change configuration".
 
1 members found this post helpful.
Old 10-13-2019, 08:59 PM   #11
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
If your CEO absolutely must have something, then Google for "Privileged Access Management" and prepare to fork over loads of cash for something like CyberArk or Centrify that will (a) make it much harder to get any real work done, and (b) provide dubious benefits and yet another set of potential security problem (what happens if someone gains unauthorized access to the manager console?). Or you can listen to the good advice given on this thread regarding *not letting people log in as root over the network*.

For a less fancy options for after-the-fact auditing, you can:

a. Configure auditd and export the audit logs (and syslogs) off box to a secure remote server.
b. Don't give anyone whose actions are being audited access to the server from a, and hope no one breaks in.
 
2 members found this post helpful.
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to Monitor User Activity on Linux with psacct or acct LXer Syndicated Linux News 0 02-23-2013 12:11 PM
How to Monitor Local User GUI Activity in Linux ? bala.linuxtech Linux - Server 2 12-01-2012 06:58 AM
'sudo ls /root/monitor/' outputs, 'sudo ls /root/monitor/*' does not stf92 Slackware 10 07-19-2012 05:20 PM
monitor user activity alagenchev Linux - Security 5 01-20-2006 10:02 PM
What do you use to monitor server activity? Wonderer Slackware 8 11-02-2003 11:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:11 PM.

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