[Samba] Change smbpasswd in a cron job
Josh Kelley
joshkel at gmail.com
Tue Feb 21 14:18:15 GMT 2006
On 2/20/06, Dennis Duggen <lists at duggen.net> wrote:
> For a project we are trying to change the samba password automatically
> in a cron job. Since smbpasswd doesn't allow the password to be entered
> otherwise than though the console (user input). We found a solution to
> the input part though expect. But as thing go expect doesn't work in a
> cron job since it has no tty.
Depending on your SAM backend, you may be able to edit the backend
directly. For example, we have some perl scripts to change passwords
by connecting directly to our LDAP server. I posted a copy of our
script at http://www.jbc.edu/~josh/changepasswd.pl if you're
interested.
Josh Kelley
More information about the samba
mailing list