top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Is there a rpm command to find the package that created a particular user or particular group?

0 votes
339 views

Given a particular user or particular group, is there a rpm command that returns what package created that particular user or particular group?

Analogous to rpm -q --whatprovides /etc/security/limits.conf returns the package "pam". Is there an rpm command that returns what package generated a particular user?

Most of us already know that the httpd package is associated with the user apache. But there are passwd and group entries that i would like to verify and want to know exactly how they got on my system. Further i would like to know which the security implications of adding another group to a user account.

Something like the following command:

`rpm --query --user apache` would return "httpd"
`rpm --query --group pulse-access` might return pulseaudio
posted Jun 27, 2013 by anonymous

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

1 Answer

0 votes

take a look at the pre/post-script parts of the rpms

rpm -q --scripts httpd

other users/groups are "installed" via centos setup (anaconda).

answer Jun 27, 2013 by anonymous
--scripts is helpful, the following returns a great deal of package scripts having to do with users and groups, but ideally would return just the package names involved in creating the user or group.

rpm -qa --scripts | egrep 'user|group|ids|getent|pass'
rpm -qa --scripts | less does not seem to list any package names, but may be a more formal rpm would help:
rpm --queryformat "%{FILEUSERNAME} %{TRIGGERSCRIPTS} %{TRIGGERSCRIPTPROG}n" --query httpd

does not return a script name and i do not see anything else in rpm --querytags that would help.

Similar Questions
+2 votes

I am trying installing Mysql server using RPM bundle

rpm -i MySQL-server-5.6.16-1.el6.x86_64.rpm
rpm -i MySQL-client-5.6.16-1.el6.x86_64.rpm

The server RPM places data under the /var/lib/mysql directory. The RPM also creates a login account for a user named mysql (if one does not exist) to use for running the MySQL server, and creates the appropriate entries in /etc/init.d/ to start the server automatically at boot time. (This means that if you have performed a previous installation and have made changes to its startup script, you may want to make a copy of the script so that you do not lose it when you install a newer RPM.

When I checked /var/lib I found none for mysql, any thoughts?

+2 votes

In my java web project, i am creating war file using ANT and i have a MAKEFILE for that. For now i want to create a binary package which will deploy war file in tomcat. I don't have much knowledge about building a rpm file. But for this i need a spec file which should do make and create a rpm package including the recently created war file.
Can anyone help?

0 votes

Just curious, I see in Gkrellm quite often RPM takes much processor time. What is this RPM "daemon" Is it needed? I have not auto update on. Where I can find config for that?

+1 vote

I am trying to figure out how to list the rpms in, say:

@base-x
or
@printing
or
@fedora-release-nonproduct

and so on.

Any help?

0 votes

How do you pass vars to rpmbuild for definition?

eg: rpmbuild --define '"${_definition2}"'

I've been fiddling with ways to escape, but none is fricking working.. I mean, rpmbuild rushes to work(no errors nor failure) so if you try just command line do not believe it, because later as it executes %if you will see process does not see these definitions.

...