dperson / samba

Samba docker container
GNU Affero General Public License v3.0
1.5k stars 509 forks source link

/usr/bin/samba.sh: line 160: $2: unbound variable #445

Open alrepin opened 11 months ago

alrepin commented 11 months ago

My docker-compose file:

version: "3.3"
services:
  samba:
    container_name: samba
    image: dperson/samba
    ports:
      - "137:137/udp"
      - "138:138/udp"
      - "139:139/tcp"
      - "445:445/tcp"
    read_only: false
    tmpfs:
      - /tmp
    restart: unless-stopped
    stdin_open: true
    tty: true
    environment:
      - "PUID=1000"
      - "PGID=1000"
      - "TZ=${TZ}"
    env_file: .env
    deploy:
      resources:
        limits:
          cpus: '0.50'
          memory: 250M
#         pids: 1
        reservations:
          cpus: '0.35'
          memory: 240M
    volumes:
      - /home/srv:/srv
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    command:
    # -s "<name;/path>[;browse;readonly;guest;users;admins;writelist;comment]" 
    # -s "name;/path;no;no;no;example1"
      -s "srv;/srv;yes;no;yes"
      -p

got error /usr/bin/samba.sh: line 160: $2: unbound variable

euivanw commented 11 months ago

Remove the " characters

tyokyo320 commented 10 months ago

I had the same problem with k8s. I found that I set the wrong user name and password, its secret should be user; password form

# line 160
user() { local name="$1" passwd="$2" id="${3:-""}" group="${4:-""}" \