I recently installed Samba and I messed up the /etc/samba/smb.conf file. How do I get the original configuration back?
|
|
||||
|
Edited: Spotted this on a serverfault question. If the
This tells
This tells |
|||||||||
|
|
Short answer: When faced with this situation for any package, what I do is one of the following:
|
|||||
|
|
Probably the easiest way to do this, if you still have the package in the apt cache is to run
where the package file name is usually something like |
|||
|
|
|
You can extract the deb and grab the original file:
|
|||||||||
|
|
You can redownload and extract the contents of the deb package |
|||||||||
|
|
The best way (gotten from #ubuntu) is to do this:
In this case that means
|
|||
|
|
|
You can restore the original
This is basically what the original package installation process does (on Debian Squeeze). This will overwrite you current |
|||||
|
sudo cp /usr/share/samba/smb.conf /etc/samba/smb.conf– ThorSummoner Nov 18 '17 at 6:13