Solved

Samba password changed by accident ( fedora) - way to get it back ? Ive backups of samba files.

Posted on 2011-03-18
2
263 Views
Last Modified: 2012-05-11

Ive changed the password by accident.
I may have been creating accounts / passwords.

May have changed the samba password by accident.

Mate is going to help me later,  is it vert difficult to ge back?
0
Comment
Question by:fcek
2 Comments
 
LVL 44

Expert Comment

by:Darr247
Comment Utility
Did you try running

# system-config-samba

?
0
 
LVL 23

Accepted Solution

by:
Mysidia earned 500 total points
Comment Utility
This depends on where the password is stored.
For Samba3..

If stored in the local SAM database, passdb backend, and you have a backup of passdb.tdb
you could use  pdbedit.

pdbedit -itdbsam:/path/to/backup/passdb.tdb  -esmbpasswd:/root/oldsmbpasswd.txt
pdbedit -itdbsam:/path/to/current/passdb.tdb  -esmbpasswd:/root/cursmbpasswd.txt

Edit  the user's password hash in flatfile  cursmbpasswd.txt
to match the one in  oldsmbpasswd.txt

pdbedit  -ismbpasswd:/root/cursmbpasswd.txt   -etdbsam:/root/newpassdb.tdb

make another backup of samba files.
shutdown samba
move newpassdb.tdb  into place over  passdb.tdb





0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now