OpenWrt Forum Archive

Topic: How to add samba user?

The content of this topic has been archived on 24 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi everyone out there,

i want to create some samba users to give different people different access to my nas device.
but i reccognized that there is no "smbadduser" command.
how can i add samba user without giving them a system account?

superbear

The 'smbpasswd' command is in the samba-server package in 0.9 backports.

Please can you give me more detail on the use of smbpasswd. Explain how I create a user called "user1" and password "pass1" to my share?

smbpasswd -a [username]

smbpasswd -a user1

smbpasswd  user1

    smbpasswd [options] [username]
otherwise:
    smbpasswd [options]

options:
  -L                   local mode (must be first option)
  -h                   print this usage message
  -s                   use stdin for password prompt
  -c smb.conf file     Use the given path to the smb.conf file
  -D LEVEL             debug level
  -r MACHINE           remote machine
  -U USER              remote username
extra options when run by root or in local mode:
  -a                   add user
  -d                   disable user
  -e                   enable user
  -i                   interdomain trust account
  -m                   machine trust account
  -n                   set no password
  -w PASSWORD          ldap admin password
  -x                   delete user
  -R ORDER             name resolve order

The discussion might have continued from here.