---
name: "addtosmbpass"
section: "1"
platform: "linux"
package: "samba"
version: "1.9.15p4-1"
release: "Debian 1.1 (Buzz)"
platforms: ["linux"]
url: "https://new.carta.tech/addtosmbpass"
---

# addtosmbpass(1)

add entry for an existing account to a Samba password file.

## NAME

addtosmbpass - add entry for an existing account to a Samba password file.

## SYNOPSIS

**addtosmbpass** *name* \[ *name ...* \]

## DESCRIPTION

*addtosmbpass* is a utility for adding entries, in a proper format, to a file used by Samba when validating passwords for clients (most likely */usr/local/samba/lib/smbpasswd* but this default can be changed in a compile time).  An old (possibly empty as in */dev/null* ) Samba password file is expected on stdin and a new file, with skeleton entries for arguments added, is printed on stdout.  A file */etc/passwd* is scanned for a required information. If an entry for a *name* is not present then account data are searched in NIS data bases - if possible.  If an entry for *name* already exists in stdin input or it account information cannot be found then this request is quietly skipped.

## FILES

*/usr/local/samba/lib/smbpasswd, /etc/passwd*

## SEE ALSO

smbpasswd(1), [passwd(5)](/passwd/5.md), [ypmatch(1)](/ypmatch/1.md)

## BUGS

*addtosmbpass,* like other Samba password file utilities, is written in *awk.* Although an attempt was made to accommodate various broken variants of *awk* which may be around there is no guarantee that what you have  is even worse.

It is assumed that if *ypmatch* program exists then NIS was set and the program will work.  This may not be true.  In such case just comment out a line which sets **ypmatch** variable in BEGIN block.

A location of awk interpreter at the top of the program may need an adjustment.  Also a user may edit a program modifying it beyong recognition.  This last property may be construed as a feature.

## AUTHOR

Michal Jaegermann (michal@ellpspace.math.ualberta.ca)
