KSMBDPWD.DB(5)

πŸ’Ύ KSMBDPWD.DB β€” the ksmbd user database, bestie

okay so this page is about ksmbdpwd.db, which lives in section 5 (File Formats and Conventions, the ✨vibes✨ section, iykyk). Let's get into it 🫢


✨ NAME ✨

ksmbdpwd.db β€” the user database for ksmbd.mountd


🌸 DESCRIPTION 🌸

So ksmbdpwd.db is, like, the user database for the ksmbd.mountd(8) user mode daemon. That's the whole thing. It's the little book of users πŸ“–βœ¨

And listen β€” you don't have to hand-edit it! ksmbd.adduser(8) is right there to configure users for ksmbdpwd.db for you. Iconic. πŸ’…

Here's the cute part: if ksmbd.adduser actually made any changes, it notifies ksmbd.mountd by sending it the SIGHUP signal. Like a little "hey bestie, heads up, something changed πŸ‘€". And if you're not using ksmbd.adduser? No problem, you can use ksmbd.control --reload to notify ksmbd.mountd of changes instead. Two paths, both slay.

By default, ksmbdpwd.db is expected to be at /etc/ksmbd/ksmbdpwd.db. That's home. 🏠


πŸŽ€ FILE FORMAT πŸŽ€

okay so the format is genuinely so simple, no cap:

ksmbdpwd.db consists of users separated by newlines. That's it. One user per line, newline between them.

Each user consists of a name and a password, in that order, separated by a colon (:). So it's giving... name:password. Periodt.

Now the rules, and these are the real ones so pay attention πŸ”₯

  • The name must be UTF-8 and [1, 48) bytes. So at least 1 byte, and less than 48 bytes. Not 48. Less than 48.
  • The password is created from the user-input UTF-8 password, which is [0, 129) bytes, by:
    1. converting it to UTF-16LE,
    2. then MD4-hashing it,
    3. and finally Base64-encoding and padding it.

That's the whole pipeline. Convert β†’ hash β†’ encode β†’ pad. Chef's kiss. 😌✨

heads up: that's a description of how the stored password is derived, bestie β€” don't go inventing your own scheme, just let ksmbd.adduser(8) do it.

Copyright Β© 2015-2022 ksmbd-tools contributors. License GPLv2: GNU GPL version 2 <https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html>.

This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. (like, none. zero. nada. 😭)


πŸ› REPORTING BUGS πŸ›

Found a bug? For bug reports, use the issue tracker at <https://github.com/cifsd-team/ksmbd-tools/issues>. Do not suffer in silence, bestie, the maintainers wanna know 🫢


🌈 SEE ALSO 🌈

Utilities


and that's the whole page, bestie!! πŸ’– this one is from ksmbd-tools 3.5.7, manual page KSMBDPWD.DB(5) β€” go forth and configure your users, you absolute main character πŸ‘‘πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from