Yum - how to list what a package does

I installed a package: yum install <package>

It created a username in the /etc/passwd - along with some other things.

Anyway, I know the package is safe. But, in the future, I was wondering if there is a command that tells you what the package is going to do.


-creates user in /etc/passwd
-place a XYZ in /bin

Thanks for any info
RamblSystems AdminAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

yum info <packagename>

[root@bighat ~]# yum info passwd
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * fedora: fedora.mirrors.pair.com
 * rpmfusion-free: mirror.us.leaseweb.net
 * rpmfusion-free-updates: mirror.us.leaseweb.net
 * rpmfusion-nonfree: mirror.us.leaseweb.net
 * rpmfusion-nonfree-updates: mirror.us.leaseweb.net
 * updates: fedora.osuosl.org
Installed Packages
Name        : passwd
Arch        : x86_64
Version     : 0.79
Release     : 5.fc21
Size        : 412 k
Repo        : installed
From repo   : koji-override-0
Summary     : An utility for setting or changing passwords using PAM
URL         : http://fedorahosted.org/passwd
License     : BSD or GPL+
Description : This package contains a system utility (passwd) which sets
            : or changes passwords, using PAM (Pluggable Authentication
            : Modules) library.
RamblSystems AdminAuthor Commented:
Yes, I used that command before. ...it might be the only one out there - but I was hoping to get more details
What other details are you looking for?

You can use the RPM command to get some info also.  For example to find where the configuration files are located:

[root@bighat ~]# rpm -qc passwd

or you can find out what other packages require a specific package:

[root@bighat ~]# rpm -q --whatrequires passwd

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

RamblSystems AdminAuthor Commented:
I suppose I wanted to know that the package was going to add a user to my /etc/passwd file.

Then when I did a yum erase <package>

The user is still in the passwd file. Makes me wonder what other changes the package made...and didn't clean up.
The package did exactly what is was supposed to do.  I think you are mixing up two things.

A package is just a way to install software, not a way to create configuration.  The software within the package helps create configurations.

For example, if you install vsftp (an ftp software package) and configure it, then delete it, it will not delete your configurations.

deleting the package only deletes the software, nothing that you created with the software will be deleted.

Does that make sense?

If you want to delete a user you can use the userdel command.
yum is just a front-end to manage rpms, resolving dependencies etc, so you need to look at the underlying rpm. The rpm package contains a spec file which enables %pre(install), %post(install), %preun(install) and %postun(install) commands to be run;

`rpm --scripts -qp {rpmname}.rpm` should list the spec file, so you should see the commands that did the "useradd" etc.

`rpm -qlp {rpmname}.rpm will list the files to be installed, along with their directory paths

It may be valid for the package to add the userid if needed, but risky to remove it, so I can understand why it didn't revert everything it had done.

There are also %triggers, which may also run commands - But I haven't figured those out yet!
It is quite normal that running daemon uses unprivileged user that is locked for logons. You cannot run everything as root, nor as nobody, for security you know.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.