System information

Chapter 4. Installing and configuring Samba 77
Example 4-8 Setting SMB encrypted password
# /usr/bin/smbpasswd -U mojoe
New SMB password:
Retype new SMB password:
Password changed for user mojoe.
#
Another way is to have each Samba user change the password for himself, by remotely
connecting to the Samba server and executing the command:
/usr/bin/smbpasswd
The output will be similar to Example 4-8. If the user account already has a password defined,
the person will be prompted for the old password before the new password can be entered.
A new user can be added to the encrypted password file later by typing the command:
/usr/bin/smbpasswd -a <username> <password>
This should be done after the Linux user account has been created.
4.4 Starting and stopping the Samba server
You can start the Samba server by executing the command:
service smb start
This will start the smbd and nmbd daemons. Smbd is the actual Samba server and nmbd is
the WINS server.
The Samba server can be stopped by executing the command:
service smb stop
Whenever modifications are made to smb.conf, the Samba server must be restarted. This
can be done by executing the command:
service smb restart
4.5 Starting Samba as part of the boot process
The Samba server can be configured to start when the system boots. This can be done using
chkconfig by executing the command:
chkconfig smb on
Check that it will be started by executing the command:
chkconfig --list smb
The output should look similar to Example 4-9 on page 78.
Note: Anyone with write access to /usr/bin/smbpasswd can change passwords for the
Samba users.
Note: Only root can manage other user IDs. Standard users can only change their own
password. The smbpasswd utility uses the password file specified in smb.conf.