wiki:MasterPasswdSyntax

Version 1 (modified by Herwig Bauernfeind, 17 years ago) ( diff )

Syntax of master.passwd file

Syntax of master.passwd

The master.passwd is a text file with every line holding exactly one user.

Note: The user information in master.passwd is a prerequisite for Samba's own user information.

One line consists of several fields delimited by a ":".

Sample line with all fields:

Username:password:UID:GID:Login-Class:Change pw in x sec:Deactivate in x sec:GECOS:HOME:SHELL

FieldDescriptionRecommended value when using SambaExample
UsernameUsername that should be used to loginRequired fieldherwig
PasswordNot used currentlyLeave empty or add * as value*
UIDUser-IDRequired, give each user a unique number110
GIDGroup-IDRequired. If groups are not used, same value as UID110
Login-ClassNot used currentlySet to zero (0)0
Change pw in x secNot used currentlySet to zero (0)0
Deactivate pw in x secNot used currentlySet to zero (0)0
GECOSFull usernameUseful, but not completely supportedHerwig Bauernfeind
HomeThe user's home directoryDon't use it currently(*)/nonexistent
ShellThe user's shellNot used currently/usr/sbin/nologin

With the examples from the above table, a valid line in master.passwd would look like the following line:

# This is a comment in master.passwd herwig:*:110:110:0:0:0:Herwig Bauernfeind:/nonexistent:/usr/sbin/nologin

(*) You cannot enter a valid OS/2 path in this field as the ":" would be misinterpreted as a field delimiter resulting in a broken master.passwd. It is possible to use the kLibc PathRewriter to workaround this limitation, but this is currently not recommended.

Note: Use the [homes] section of smb.conf in case home directories should be used.

Note: See TracWiki for help on using the wiki.