Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am using redhat 9. I made some stupid changes late at night to smb.conf, not really knowing what I was doing, without making a backup, and need to start over. How do I replace the copy in etc/samba with the original from on the installation CDs? I know it's something to do with the rpm command. I've looked at "man rpm" and can't make sense of it.
If you only nned the orginal smb.conf,
the easyest way is to locate the samba.common (?) package on your install CD's.
With the use of the mc in a terminal (midnight commander) you can easaly access the rpm contents, just like a zip file.
navigate to the etc/samaba/smb.conf file and copy it to a convinient location.
The midnight commander ist a very helpfull tool for tasks like extracting one or two files from an archive.
Thanks for your help, I'm making progress but stuck again.
I can locate the samba.common.2.2.7a-7.9.0.i386.rpm file using midnight commander. I can copy the file to another location with no problems. I don't see how to view the contents of the rpm file itself, either in mc or konqueror. What do I need to do now?
The following maybe is a little to detailed,
I just wanted to make clear the concept of virtual file systems in MC
(works the same in a lot of other tools too)
In the MC (on the 'left-side') :
navigate to the rpm using the cursor keys,
and enter key to access a directory. (this is common sense,
you probably knew this allready.)
This is so simple, you are probaly not consiously aware that it works that way.
Now, the beauty of the MC is;
you can access ZIP, TAR, RPM, CPIO and loads of other files just in the same way as you enter directories.
(The only caveat is, that you should make sure the file you want to 'enter' is not flagged as executable (marked green and a * in MC)
otherwise MC will convienetly try to execute said file. For RPMS this will result in an error)
To retrive one (1) file from an RPM (or other encapsulated format)
you navigate to the file, and press the enter key on this file.
this should show you the contents off the RPM file.
you will see 2 directories (/etc and /usr) and some RPM internal information files (you can ignore these)
in the RPM you navigate to /etc/samba/smb.conf, now on the right side of MC, you go to (for instance) /tmp.
Now you change back to the left side with the TAB key, and press F5 (copy file)
Thats it, now you have the orignal smb.conf lying around in /tmp.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.