Changing password for Administrator in Samba4

Now when you have a successful running Samba4 domain server, you might come across a time when you will have to change the Administrator password. Let me show you the steps to do the same:
Let us verify the details of the current password. As soon as you create a Kerberos password for authentication against clients it creates a expiration date of the password.

The klist command displays the contents of a Kerberos credentials cache or key table.

-e : Displays the encryption type for the session key and the ticket.

# klist -e
Ticket cache: FILE:/tmp/krb5cc_0
Default principal: administrator@EXAMPLE.COM

Valid starting     Expires            Service principal
03/25/13 05:46:08  03/25/13 15:46:08  krbtgt/EXAMPLE.COM@EXAMPLE.COM
       renew until 03/26/13 05:46:04, Etype (skey, tkt): arcfour-hmac, arcfour-hmac


Now to change the current administrator password

# kpasswd
Password for administrator@EXAMPLE.COM:
Enter new password:
Enter it again:
Password changed.

How to Reset Administrator Password

In case you forgot the administrator password then no need to panic as you can reset the password by logging physically into the domain server box

# samba-tool user setpassword Administrator
New Password:
Enter it again:
Password changed.

Related Articles
Samba 4.1 as Active Directory configuration guide
How to configure Linux client to join samba4 domain

2 thoughts on “Changing password for Administrator in Samba4”

Leave a Comment