How to use ChangePassword to modify the Samba account password under CentOS 6.3

Source: Internet
Author: User
Tags ldap centos iptables linux

Recently has been studying the Linux shell, so long time no update. Today is also in QQ someone and I talk to the Samba password LDAP centralized authentication, think of a problem, the intranet use Samba server to store user data, all users can not log into the Linux background, how to allow customers to modify their passwords?

To resolve the implementation of the client to modify the samba password, in fact, do not need to build LDAP (maintenance costs are high), also do not need to use administrative methods to statistics client password (after all, colleagues are embarrassed to tell you he usually used the password), online Google, Using the ChangePassword tool, you can use its web interface to allow ordinary users to log on to the Web to modify their passwords, greatly improving work efficiency.

Samba:centos default Yum Source

changepassword:changepassword-0.9

apache:httpd-2.4.4

I. Environment:

1. Before configuring the iptables and SELinux, avoid the error in the configuration process.

# Service Iptables Stop

# Setenforce 0

# Vi/etc/sysconfig/selinux

---------------

Selinux=disabled

---------------

2. Install the development package

# yum Install Gcc-y

3. Install Apache

Transmission door: http://showerlee.blog.51cto.com/2047005/1174141

Two. Configure Samba:

1. Install Samba:

# yum Install Samba-y

2. Configure Samba:

To implement a client change password using the ChangePassword program, you must set the system password and Samba password synchronization

# vi/etc/samba/smb.conf

Search Security = User then add the following and comment passdb backend = Tdbsam

----------------

Security = User

Pam Password Change = no

passwd chat = **new*unix*password*%n\n *retype*new*unix*password*%n\n *successfully*

passwd program = lang=en_us/usr/bin/passwd%u

Unix Password sync = yes

Passdb backend = smbpasswd

SMB passwd file =/etc/samba/smbpasswd

# Passdb backend = Tdbsam

--------------------------

Note: The above changes in fact will be TDBSAM authentication mode to modify the SMBPASSWD, and the authentication file encryption saved under/ETC/SAMBA/SMBPASSWD

Restart Service:

# Service SMB Restart

Create Samba account (Close user shell interface)

# useradd-s/sbin/nologin User01

# passwd User01

# smbpasswd-a User01

Note: You must set up the system account password and the SMB account password when creating the Samba account here

Because ChangePassword changes the password mechanism, first modifies the system account password, then synchronizes the system account password to the/ETC/SAMBA/SMBPASSWD SMB password library file.

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/OS/Linux/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.