In Suse the files are located in /etc/samba by default. When configured,
the sbmpasswd is created automatically if it doesn't exist. When an
update rpm installs a new file (such as an updated default configuration
file) and the previous one was altered it will be saved as *.rpmnew. But
that didn't happen, the file was just gone after I ran the update. I
have no clue as to what had deleted the file and why.
No, I didn't run a backup. I have NEVER seen a file like that disappear
so I didn't even expect a backup would have been required. It's just an
online patch update (zypper up). As mentioned, if a file was altered in
an update it will be saved with a different name to prevent losing local
changes. In this case it wasn't too bad as I am the only one in this
server. So I just added myself again. But obviously this would be a
disaster if it had happend in the production system. (Later I did find a
backup from a year ago, but that wouldn't have helped because the
password was changed recently.) Ah, well, for the next update
(production) I will copy the file just in case the same happens in other
Samba servers as well.
Op 13-08-2024 om 14:38 schreef Aria Bamdad:
The smbpasswd file is by default in the /var/lib/samba/private directory.
However, the file name and location can be changed using the global option
in the smb.conf file using: smb passwd file = /path/to/file/filename
Hope you made a backup prior to update!
Aria
-----Original Message-----
From: Linux on 390 Port <[email protected]> On Behalf Of Berry van
Sleeuwen
Sent: Friday, August 9, 2024 7:15 AM
To: [email protected]
Subject: Samba smbpasswd missing
Hi All,
Today I updated a Suse SLES15 SP4 server that runs Samba. Part of the update
was an update for Samba. After the update and subsequent reboot I tried to
access the Samba drive but it failed. As it turned out there is an empty
smbpasswd instead of the populated smbpasswd file.
In /var/log/messages I can see:
[RPM][27051]: install samba-4.15.13+git.691.3d3cea0641-150400.3.31.1.s390x:
success
systemd[1]: Reloading.
systemd[1]: Stopping Samba SMB Daemon...
systemd[1]: smb.service: Deactivated successfully.
systemd[1]: Stopped Samba SMB Daemon.
systemd[1]: Starting Samba SMB Daemon...
smbd[27110]: [2024/08/09 12:28:46.316693, 0]
../../source3/smbd/server.c:1734(main)
smbd[27110]: smbd version
4.15.13-git.691.3d3cea0641150400.3.31.1-SUSE-oS15.0-s390x started.
smbd[27110]: Copyright Andrew Tridgell and the Samba Team 1992-2021
smbd[27110]: [2024/08/09 12:28:46.359660, 0]
../../source3/passdb/pdb_smbpasswd.c:250(startsmbfilepwent)
smbd[27110]: startsmbfilepwent_internal: file /etc/samba/smbpasswd did not
exist. File successfully created.
systemd[1]: Started Samba SMB Daemon.
A similar message is in the samba log.
[2024/08/09 12:28:46.327212, 2]
../../source3/passdb/pdb_interface.c:163(make_pdb_method_name)
No builtin backend found, trying to load plugin
[2024/08/09 12:28:46.341267, 2]
../../source3/lib/tallocmsg.c:84(register_msg_pool_usage)
Registered MSG_REQ_POOL_USAGE
[2024/08/09 12:28:46.343155, 2]
../../source3/lib/tallocmsg.c:84(register_msg_pool_usage)
Registered MSG_REQ_POOL_USAGE
[2024/08/09 12:28:46.359660, 0]
../../source3/passdb/pdb_smbpasswd.c:250(startsmbfilepwent)
startsmbfilepwent_internal: file /etc/samba/smbpasswd did not exist. File
successfully created.
I'm pretty sure the smbpasswd file should have been there. If anything,
earlier this month I have changed my password without errors. So it looks
like the update process has removed the smbpasswd file.
Any idea what could have caused this?
Met vriendelijke groet/With kind regards/Mit freundlichen Grüßen,
Berry van Sleeuwen
Flight Forum 3000 5657 EW Eindhoven
* +31 (0)6 22564276
[cid:[email protected]]
[cid:[email protected]]
----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or
visit
http://www2.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www2.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www2.marist.edu/htbin/wlvindex?LINUX-390