Git Product home page Git Product logo

docker-samba-ldap's People

Contributors

marcoh00 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

docker-samba-ldap's Issues

Tons of errors when starting this up; impossible to start.

I have not done any outrageous configuration as far as I can see, but I cannot get this container to start up at all. Below are the logs:

samba   | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
samba   | [s6-init] ensuring user provided files have correct perms...exited 0.
samba   | [fix-attrs.d] applying ownership & permissions fixes...
samba   | [fix-attrs.d] log: applying...
samba   | [fix-attrs.d] log: exited 0.
samba   | [fix-attrs.d] volumes: applying...
samba   | [fix-attrs.d] volumes: exited 0.
samba   | [fix-attrs.d] done.
samba   | [cont-init.d] executing container initialization scripts...
samba   | [cont-init.d] done.
samba   | [services.d] starting services
samba   | [services.d] done.
samba   | smbd version 4.5.12-Debian started.
samba   | Copyright Andrew Tridgell and the Samba Team 1992-2016
samba   | Registered MSG_REQ_POOL_USAGE
samba   | Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED
samba   | lp_load_ex: refreshing parameters
samba   | Initialising global parameters
samba   | Processing section "[global]"
samba   | Processing section "[test]"
samba   | adding IPC service
samba   | added interface eth0 ip=172.25.0.3 bcast=172.25.255.255 netmask=255.255.0.0
samba   | loaded services
samba   | INFO: Profiling support unavailable in this build.
samba   | Becoming a daemon.
samba   | smbldap_search_domain_info: Searching for:[(&(objectClass=sambaDomain)(sambaDomainName=WILBURSPACE))]
samba   | smbldap_open_connection: connection opened
samba   | ldap_connect_system: successful connection to the LDAP server
samba   | pid_to_procid: messaging_dgm_get_unique failed: No such file or directory
samba   | tdb(/var/lib/samba/registry.tdb): tdb_open_ex: could not open file /var/lib/samba/registry.tdb: No such file or directory
samba   | Could not open tdb: No such file or directory
samba   | ERROR: Got 0 entries for gid 65534, expected one
samba   | tdb(/var/lib/samba/account_policy.tdb): tdb_open_ex: could not open file /var/lib/samba/account_policy.tdb: No such file or directory
samba   | Could not open tdb: No such file or directory
samba   | account_policy_get: tdb_fetch_uint32_t failed for type 1 (min password length), returning 0
samba   | account_policy_get: tdb_fetch_uint32_t failed for type 2 (password history), returning 0
samba   | account_policy_get: tdb_fetch_uint32_t failed for type 3 (user must logon to change password), returning 0
samba   | account_policy_get: tdb_fetch_uint32_t failed for type 4 (maximum password age), returning 0
samba   | account_policy_get: tdb_fetch_uint32_t failed for type 5 (minimum password age), returning 0
samba   | account_policy_get: tdb_fetch_uint32_t failed for type 6 (lockout duration), returning 0
samba   | account_policy_get: tdb_fetch_uint32_t failed for type 7 (reset count minutes), returning 0
samba   | account_policy_get: tdb_fetch_uint32_t failed for type 8 (bad lockout attempt), returning 0
samba   | account_policy_get: tdb_fetch_uint32_t failed for type 9 (disconnect time), returning 0
samba   | account_policy_get: tdb_fetch_uint32_t failed for type 10 (refuse machine password change), returning 0
samba   | Initialise the svcctl registry keys if needed.
samba   | Initialise the eventlog registry keys if needed.
samba   | STATUS=daemon 'smbd' finished starting up and ready to serve connections
samba   | waiting for connections
samba   | Server exit (EOF on stdin)
samba   | [cmd] /usr/sbin/smbd exited 271
samba   | [cont-finish.d] executing container finish scripts...
samba   | [cont-finish.d] done.
samba   | [s6-finish] syncing disks.
samba   | [s6-finish] sending all processes the TERM signal.
samba   | [s6-finish] sending all processes the KILL signal and exiting.
samba exited with code 15

In particular, I draw your attention to these:

  • pid_to_procid: messaging_dgm_get_unique failed: No such file or directory
  • The multiple errors opening up TDB files. I believe these get generated when this happens, but I cannot confirm. It seems to go away when I re-run docker-compose up smb, where smb is the name of this container. Also, it does not seem to stop anything.
  • Server exit (EOF on stdin). I saw that you made a commit that supposedly changed this in the Dockerfile, but I am using the latest update, and this is still an issue. I also tried explicitly overriding CMD with both the -D -S -F options and with -D -S -F < /dev/null and both still gave me this issue. I believe this is the big issue that is completely stopping this from working.

Please help. I can give you more information if you need it, such as configuration files, but I feel like this has more to do with S6 than Samba.

How to set up with existing LDAP instance?

Hi, I have been trying to use the container but I found an issue with share declaration.

This is how I started samba:

docker run --name smb \
	--rm \
	-it \
	-p 139:139 \
 	-p 445:445 \
	-v $(pwd)/assets/smb.conf:/etc/samba/smb.conf \
 	-v $(pwd)/assets/secrets.tdb:/var/lib/samba/private/secrets.tdb \
 	-v $(pwd)/assets/smbldap-tools:/etc/smbldap-tools \
 	-v $(pwd)/assets/nslcd.conf:/etc/nslcd.conf \
 	-v $(pwd)/assets/GandiStandardSSLCA2.pem:/etc/ssl/certs/ca-certificates.crt \
 	-v $(pwd)/samba:/samba \
 	marcoh00/samba-ldap \

When I do:

[Anonymous]
	path = /samba/anonymous
	browsable = yes
	writable = yes
	read only = no
	force user = nobody

[AShare]
	path = /samba/AShare
	browseable = yes
	read only = no
	valid users = dka administrator

[officemain]
    writeable = yes
    path = /samba/officemain
	valid users = dka

[homes]
    browseable = no
    comment = Home Directory
    writeable = yes
    path = /samba/home/%S

Then it keep complaining when I try to access the drive from samba client:

 smbclient //localhost/samba -U dka
process_usershare_file: stat of /var/lib/samba/usershares/samba failed. Permission denied
process_usershare_file: stat of /var/lib/samba/usershares/samba failed. No such file or directory

I have seen that usershare path is having default to /var/lib/samba/usershares in smb.conf but I am not sure if it's related with share mount path.

The error seems to tell that the volume we are mounting is just ignored during share configuration.

Any help?

smbd can not open secrets.tdb

root@ubuntu:/# docker run -it --name samba -p 139:139 -p 445:445 -v /smb.conf:/etc/samba/smb.conf -v /secrets.tdb:/var/lib/samba/private/secrets.tdb -v /smbldap-tools:/etc/smbldap-tools -v /nslcd.conf:/etc/nslcd.conf -v /test:/srv -h ldap-host marcoh00/samba-ldap[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] log: applying...
[fix-attrs.d] log: exited 0.
[fix-attrs.d] volumes: applying...
[fix-attrs.d] volumes: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
smbd version 4.5.8-Debian started.
Copyright Andrew Tridgell and the Samba Team 1992-2016
Failed to open /var/lib/samba/private/secrets.tdb
Failed to open /var/lib/samba/private/secrets.tdb
STATUS=daemon failed to start: smbd can not open secrets.tdb, error code 13
/usr/sbin/smbd exited 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] syncing disks.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

Issue in the Dockerfile

Hello, I didn't do a PR, but I might eventually.

When I tried to do the docker build, I got an error stating "E: Unable to correct problems, you have held broken packages.". This was due to the second line bellow

RUN apt-get update && \
    apt-get install --no-install-recommends --no-install-suggests -y samba=$SAMBA_VERSION smbldap-tools ldap-utils && \
    DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y libnss-ldapd && \
    rm -rf /var/cache/apt && \
    rm -rf /etc/samba/smb.conf /var/lib/samba/private/secrets.tdb /etc/smbldap-tools /etc/nslcd.conf /etc/nsswitch.conf

The DEBIAN_FRONTEND also need to be on the second line, which will look like this:

RUN apt-get update && \
    DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y samba=$SAMBA_VERSION smbldap-tools ldap-utils && \
    DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y libnss-ldapd && \
    rm -rf /var/cache/apt && \
    rm -rf /etc/samba/smb.conf /var/lib/samba/private/secrets.tdb /etc/smbldap-tools /etc/nslcd.conf /etc/nsswitch.conf

Once it's like this, the error goes away.

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.