Link to home
Start Free TrialLog in
Avatar of Rambl
Rambl

asked on

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.

ie.  

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

Thanks for any info
SOLUTION
Avatar of Steven Vona
Steven Vona
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Rambl
Rambl

ASKER

Yes, I used that command before. ...it might be the only one out there - but I was hoping to get more details
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Rambl

ASKER

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.