gstackoverflow
gstackoverflow

Reputation: 37106

How to create user in Samba server using jcif library?

I start Samba server using following docker-compose:

services:
  samba:
    image: instantlinux/samba-dc:latest
    container_name: samba-dc
    cap_add:
      - CAP_SYS_ADMIN
    hostname: my.company
    environment:
      DOMAIN_ACTION: provision
      REALM: my.company
    volumes:
      - etc:/etc/samba
      - lib:/var/lib/samba
    ports:
      - "53:53"
      - "53:53/udp"
      - "88:88"
      - "88:88/udp"
      - "389:389"
      - "139:139"
      - "446:445"
    secrets:
      - samba-admin-password

I want to create minimal reproducible example on java which allow to create user using SAMR protocol.

I've found library https://github.com/codelibs/jcifs

And there are some files/classes with names related to samr in the package jcifs.dcerpc.msrpc:

But I can't find any example of usage of those classes.

could you please help me with user creation implementaion ?

Upvotes: 0

Views: 71

Answers (0)

Related Questions