Trigger mail on rpm installation event

General support questions
Post Reply
smasoom5217
Posts: 4
Joined: 2017/09/25 02:59:35

Trigger mail on rpm installation event

Post by smasoom5217 » 2017/09/25 03:08:21

Hi All,

Kindly help me with below query.

I want to create script for triggering email on rpm installation by any user.
If any user install rpm on CentOs machine then system should generate email containing username, rpm package and when it installed.

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Trigger mail on rpm installation event

Post by TrevorH » 2017/09/25 13:21:10

Your user would need root access to install surely?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

smasoom5217
Posts: 4
Joined: 2017/09/25 02:59:35

Re: Trigger mail on rpm installation event

Post by smasoom5217 » 2017/09/26 08:23:02

Thanks for reply.
I know that, if any user having sudo permission then user can install RPM Package.
I just want track all activity related to installation of any RPM package with using script.

MartinR
Posts: 714
Joined: 2015/05/11 07:53:27
Location: UK

Re: Trigger mail on rpm installation event

Post by MartinR » 2017/09/26 14:59:48

If you run logwatch you will get all sudo activity reported.

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Trigger mail on rpm installation event

Post by TrevorH » 2017/09/26 15:01:59

The best way to do this is not to let them sudo anything. If you have specific commands that you want to allow them to execute, set up sudo to let them run that. Don't let them run anything.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

smasoom5217
Posts: 4
Joined: 2017/09/25 02:59:35

Re: Trigger mail on rpm installation event

Post by smasoom5217 » 2017/09/27 07:06:04

The users are linux administrator and they having root access. so to keep the track of package installation related activity without knowing them.

Guys please help

smasoom5217
Posts: 4
Joined: 2017/09/25 02:59:35

Re: Trigger mail on rpm installation event

Post by smasoom5217 » 2017/10/23 15:07:02

Guys please help :cry:

stevemowbray
Posts: 519
Joined: 2012/06/26 14:20:47

Re: Trigger mail on rpm installation event

Post by stevemowbray » 2017/10/23 15:23:48

Is there some reason MartinR's suggestion of logwatch won't work for you?

Post Reply