Solved

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

Posted on 2011-03-18
2
272 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
[X]
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
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
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 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…

707 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