Solved

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

Posted on 2011-03-18
2
265 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

930 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

13 Experts available now in Live!

Get 1:1 Help Now