오류 내용

삼바의 새로운 계정을 추가하기 위해 아래 명령어를 입력시 오류 발생

$ smbpasswd -a [사용자계정]

 

test@test-Desktop-PC:~$ smbpasswd -a release
When run by root:
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 (e.g. SAM/user)
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                   use stdin ldap admin password
-w PASSWORD          ldap admin password
-x                   delete user
-R ORDER             name resolve order

 

해결 방법

root계정에서 smbpasswd -a [사용자계정] 명령어를 입력했을때 발생한 문제다. sudo를 추가하면 해결된다.

$ sudo smbpasswd -a [사용자계정]