Solved

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

Posted on 2011-03-18
2
266 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
ID: 35170283
Did you try running

# system-config-samba

?
0
 
LVL 23

Accepted Solution

by:
Mysidia earned 500 total points
ID: 35170486
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

831 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