Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
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…
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

829 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