[Samba] Smbpasswd in a cron job

Tomasz Chmielewski mangoo at wpkg.org
Mon Feb 20 12:06:05 GMT 2006


Dennis Duggen wrote:
> Hi list
> 
> 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.
> 
> Is there anyone who can point us the right way to a solution.

Hi,

I also had a similar problem with providing a password to cupsaddsmb.

You might try running your expect script through screen (although I 
solved the cupsaddsmb problem differently).


-- 
Tomasz Chmielewski
Software deployment with Samba
http://wpkg.org


More information about the samba mailing list