Recover configuration file with rpm

Tim Largy tim.largy at gmail.com
Sun May 28 20:18:48 UTC 2006


I edited a configuration file and didn't save the original :) and now
I want to get the original back. First, I determined which package the
file belongs to (where the file in quesiton is /etc/samba/smb.conf):

$ rpm -qf /etc/samba/smb.conf
samba-common-3.0.10-1.4E.6

I have a copy of the package sitting in my yum cache, so I attempted
to recover the file this way:

$ pwd
/etc/samba
$ mv smb.conf smb.conf.save
$ rpm --install --replacepkgs --allfiles
/var/cache/yum/base/packages/samba-common-3.0.10-1.4E.6.i386.rpm

rpm did its thing, but didn't give me a new smb.conf. What am I doing wrong?

Tim




More information about the fedora-list mailing list