6.4.2.2 Changing the encrypted password If you (Shared web hosting) need

6.4.2.2 Changing the encrypted password If you need to change the encrypted password in the smbpasswd file, you can also use the smbpasswd program. Note that this program shares the same name as the encrypted password file itself, so be sure not to accidentally confuse the password file with the password-changing program. The smbpasswd program is almost identical to the passwd program that is used to change Unix account passwords. The program simply asks you to enter your old password (unless you re the root user), and duplicate entries of your new password. No password characters are shown on the screen. # smbpasswd dave Old SMB password: New SMB password: Retype new SMB password: Password changed for user dave You can look at the smbpasswd file after this command completes to verify that both the LAN Manager and the NT hashes of the passwords have been stored in their respective positions. Once users have encrypted password entries in the database, they should be able to connect to shares using encrypted passwords! 6.4.3 Password Synchronization Having a regular password and an encrypted version of the same password can be troublesome when you need to change both of them. Luckily, Samba affords you a limited ability to keep your passwords synchronized. Samba has a pair of configuration options that can be used to automatically update a user s regular Unix password when the encrypted password is changed on the system. The feature can be activated by specifying the unixpasswordsyncglobal configuration option: [global] encrypt passwords = yes smb passwd file = /usr/local/samba/private/smbpasswd unix password sync = yes With this option enabled, Samba will attempt to change the user s regular password (as root) when the encrypted version is changed with smbpasswd. However, there are two other options that have to be set correctly in order for this to work. The easier of the two is passwdprogram. This option simply specifies the Unix command used to change a user s standard system password. It is set to /bin/passwd %uby default. With some Unix systems, this is sufficient and you do not need to change anything. Others, such as Red Hat Linux, use /usr/bin/passwd instead. In addition, you may want to change this to another program or script at some point in the future. For example, let s assume that you want to use a script called changepassto change a user s password. Recall that you can use the variable %u to represent the current Unix username. So the example becomes: 200
If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.

Leave a Reply