linux - Can I tell if Root / Sudo has been used/accessed
2014-07
Would it be possible to check if the root user (or sudo) has been accessed on my server.
I ask this because I am creating a server monitoring tool and I wanted to know if there was a way to check this.
If it is possible where would I go to check it.
I am currently testing my application on Arch Linux and Ubuntu 11.04
Any help would be much appreciated.
Thanks!
Normally using grep
on /var/log/auth.log
should show you who/what got root privileges.
Is there Any latest linux distro which gives full root access ( NO SUDO ) ? I want to use it for programming in which I have to use / file system very frequently.
What I need is any good linux distro with Nice Installer like Synaptic and Fast Bootup speed like ubuntu 9.04.
Does Fedora 11 gives full root access?
Thanks, Sunny.
Becoming root for one session:
In Ubuntu you can become root for the remainder of the session by typing:
# old-school method
sudo su
# new hotness, comes highly recommended
sudo -i
More information and related reading.
Permanently enabling the root account:
Further, you may permanently enable the root account by typing:
sudo passwd root
and providing a root password. You can then log in as root at your leisure without needing to use sudo
.
Why not just log in as root when you start up? You provide the root password in the install process of most distributions (Fedora as you mentioned, is an example). If you forgot this you can reset it from a user account:
sudo passwd root
it will then ask you for your new UNIX password.
If you'd like to become root temporarily AND use root's environment settings:
sudo su -
fedora offer full root access by typing
su
Or you can use your debian based distro (ubuntu) and type
sudo bash
to get semi-permanent root shell.
Puppy Linux boots and will auto-login with root user by default.