silviud Asked: 2010-12-25 12:04:21 +0800 CST2010-12-25 12:04:21 +0800 CST 2010-12-25 12:04:21 +0800 CST Change Windows AD password from Linux 772 Is there a way to change my Windows domain password from Linux? windows linux active-directory samba 2 Answers Voted JamesBarnett 2010-12-28T07:19:19+08:002010-12-28T07:19:19+08:00 I've done this on OS X, the same command exist on linux. According to this site. Looks like the way to avoid adding the username to smbpasswd file to use smbpasswd -U <user> -r <IP address of DC> Justin 2015-10-27T06:47:38+08:002015-10-27T06:47:38+08:00 I'm using the same solution as @JamesBarnett, I've just created a script that also gets the domain controller IP too (I never know what the IP is when I need to change my password). #!/bin/bash USER="your.username" DOMAIN="yourdomain.com" smbpasswd -U $USER -r `nslookup _ldap._tcp.dc._msdcs.$DOMAIN | awk '{print $2;exit;}'`
I've done this on OS X, the same command exist on linux.
According to this site. Looks like the way to avoid adding the username to smbpasswd file to use
smbpasswd -U <user> -r <IP address of DC>
I'm using the same solution as
@JamesBarnett
, I've just created a script that also gets the domain controller IP too (I never know what the IP is when I need to change my password).