top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Best way to log sudo group

0 votes
222 views

What is the best way to give root privileges and also log their activity logs. What I did was I have created a user added to group assigned admin rights to the group using entry:-

%group_name ALL = ALL ALL

It works but first time it asks password and it also logs that and after that it dose'nt ask for password and works without giving sudo command

In the next scenario it asks for sudo before any command and logs it without sudo asking for password

I need to work it like it asks for password first time with sudo and then dont need sudo to be added before a command and also logs it.

we use mostly Fedora 15 and CentOS 6.0 up versions on servers.

posted Jul 5, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Have it as

User_Alias ADMIN = * 
ADMIN ALL=(ALL) ALL

After that, you need your password, UNLESS you sudo again in a short time, like within a minute or two. And all such commands issued should be in /var/log/secure.

And I hope you've updated to CentOS 6.4 from 6.0....

answer Jul 5, 2013 by anonymous
Similar Questions
+2 votes

I know, we can get the PIDs of all the running processes using,

ps ax | awk '{print $1}'

I want to know 2 things,
1. Is it a best way? (If not then what is the best way to get it?)
2. Will it work on all the distribution of Linux? (Ex. Ubuntu, RHEL, SLES, etc etc)

+2 votes

For many years, I used nothing but various flavours of linux (most recently, Linux Mint). I was so used to installing stuff using package managers (apt-get and yum). It was so easy, for example, to get the LAMP stack up and running.

I recently switched to a Mac, and I suddenly miss the familiar apt-get. Some packages come as .pkg, others as .dmg and lots without any package (for example, apache or php). For these, I have to use pseudo package managers such as Macports or Homebrew.

My question is: which is the best way to install various open-source packages on a Mac?

0 votes

What is the relation of "apt-get install" with "apt-get update" ? What exactly "sudo apt-get update" does ?

+2 votes

When I install any Software or tool in Linux by terminal it says you need to update using

sudo apt-get update

Then I get a list of upgrades available in my Linux.

What is the difference between 'Update Manager' and terminal 'sudo apt-get update'?

+1 vote

As far as i know,

sudo su command will give root login but it will ask for user password,

su command will give root login but it is asking different password

What is the difference between this 2?

...