Code Monkey home page Code Monkey logo

Comments (5)

dperson avatar dperson commented on September 26, 2024

Hugo,

Unfortunately, both a Unix account and a Samba account need to be created. The Unix account just needs to exist (no password need be set, even though it supports using a hash). The problem is really the Samba account, smbpasswd doesn't support using a hash for creating a user and/or setting a user password.

from samba.

hugochinchilla avatar hugochinchilla commented on September 26, 2024

Yesterday I was invesitgating this a little, I found that using pdbedit I can export a samba users database in a format which smbpasswd accepts, using sudo pdbedit -L -w

The output is as follows:

user1:1003:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:28E0C29E023C2C686C0CA509E8A6B63C:[U          ]:LCT-53BA5618:
user2:1005:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:BE73623B2CBBF997DD129A725F2592E7:[U          ]:LCT-53E9E5FB:
user3:1002:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:14D4DB00CBE3C3551CB2CF890CD912C7:[U          ]:LCT-53DB779F:

I'm not sure, I haven't tested it, but I think the hashes are the passwords, I will test it when I have some time to investigate, but if this are the password hashes we should be able to add this feature, as I understand from the manpage that smbpasswd can import this data.

from samba.

dperson avatar dperson commented on September 26, 2024

I've never used pbedit before, but if you get something working that I can
run in a script in the container, let me know. I'll be glad to add it. If I
come up with a way I'll add it in as well.

David P.

On Tue, Jun 16, 2015 at 4:09 AM, Hugo Chinchilla Carbonell <
[email protected]> wrote:

Yesterday I was invesitgating this a little, I found that using pdbedit I
can export a samba users database in a format which smbpasswd accepts,
using sudo pdbedit -L -w

The output is as follows:

user1:1003:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:28E0C29E023C2C686C0CA509E8A6B63C:[U ]:LCT-53BA5618:
user2:1005:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:BE73623B2CBBF997DD129A725F2592E7:[U ]:LCT-53E9E5FB:
user3:1002:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:14D4DB00CBE3C3551CB2CF890CD912C7:[U ]:LCT-53DB779F:

I'm not sure, I haven't tested it, but I think the hashes are the
passwords, I will test it when I have some time to investigate, but if this
are the password hashes we should be able to add this feature, as I
understand from the manpage that smbpasswd can import this data.


Reply to this email directly or view it on GitHub
#6 (comment).

from samba.

dperson avatar dperson commented on September 26, 2024

I did add an import option now, it's building now and should be available shortly. You'll have to share a smbpasswd file that's already created into the container and then use the -i </full/path/to/file/in/container> to import it. Hope this solves your problem.

from samba.

hugochinchilla avatar hugochinchilla commented on September 26, 2024

Awesome, thank you very much!!

from samba.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.