<div dir="ltr">Hi Kevin! <div><br></div><div>Thanks for your help and the following command solve the problem:</div><div><br></div><div>(echo backup; echo backup) | sudo smbpasswd -as backup<br></div><div><br></div><div>Thanks!!!!</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-01-24 17:50 GMT-02:00 Kevin Olbrich <span dir="ltr"><<a href="mailto:kolbrich@dolphin-it.de" target="_blank">kolbrich@dolphin-it.de</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">I did not read the whole smbpasswd man page but you can initialize the user with „-a username“ instead of adding it and then editing the password.<div>
Just make sure to pipe the password two times, this way you can automate the process.<br><div>
<div><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">Best regards,</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">Kevin Olbrich.<br></span></div>
</div>
<br><div><div>Am 24.01.2014 um 20:46 schrieb Camilo Vieira <<a href="mailto:camilo.vieira@gmail.com" target="_blank">camilo.vieira@gmail.com</a>>:</div><div><div class="h5"><br><blockquote type="cite"><div dir="ltr">
Thanks Kevin! I will try. <br>[]'s<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014/1/24 Kevin Olbrich <span dir="ltr"><<a href="mailto:kolbrich@dolphin-it.de" target="_blank">kolbrich@dolphin-it.de</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><div>Am 24.01.2014 um 20:26 schrieb Camilo Vieira <<a href="mailto:camilo.vieira@gmail.com" target="_blank">camilo.vieira@gmail.com</a>>:</div>
<div><div><br><blockquote type="cite"><div dir="ltr"><div>Hi! </div><div><br></div><div>I'm working on Ubuntu Server 12.04 preseed instalation for the customers.</div><div>I have trying to configure a samba share and set the password for the backup user automaticaly.</div>
<div><br></div><div>I have added this lines on the post script:</div><div><br></div><div># SAMBA SHARE AUTO CONFIGURATION</div><div><br></div><div># copy the configuration </div><div>sudo cp /opt/dgb/smb.conf /etc/samba/ </div>
<div><br></div><div># set the password for the backup user</div><div><br></div><div>sudo mksmbpasswd /etc/passwd > /tmp/samba/smbpasswd</div><div>sudo mv /tmp/samba/smbpasswd /etc/samba/smbpasswd</div><div>sudo chown root:root /etc/samba/smbpasswd</div>
<div>sudo smbpasswd -a backup -n</div><div>sudo mkdir /var/backups/nds</div><div><br></div><div>sudo /etc/init.d/smbd restart </div><div>################################</div><div>Anyone knows how I can set the password using smbpasswd without user intervention?</div>
<div><br></div></div></blockquote></div></div><div><div style="margin:0px;font-family:'Lucida Grande'">(echo newPassword; echo newPassword) | smbpasswd -s</div><div style="margin:0px;font-family:'Lucida Grande'">
<br></div><div style="margin:0px;font-family:'Lucida Grande'">Greetings,</div><div style="margin:0px;font-family:'Lucida Grande'">Kevin.</div></div><br><blockquote type="cite"><div dir="ltr"><div>Thanks!</div>
</div><span><font color="#888888">
-- <br>ubuntu-users mailing list<br><a href="mailto:ubuntu-users@lists.ubuntu.com" target="_blank">ubuntu-users@lists.ubuntu.com</a><br>Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-users" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-users</a><br>
</font></span></blockquote></div><br></div><br>--<br>
ubuntu-users mailing list<br>
<a href="mailto:ubuntu-users@lists.ubuntu.com" target="_blank">ubuntu-users@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-users" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-users</a><br>
<br></blockquote></div><br></div>
-- <br>ubuntu-users mailing list<br><a href="mailto:ubuntu-users@lists.ubuntu.com" target="_blank">ubuntu-users@lists.ubuntu.com</a><br>Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-users" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-users</a><br>
</blockquote></div></div></div><br></div></div><br>--<br>
ubuntu-users mailing list<br>
<a href="mailto:ubuntu-users@lists.ubuntu.com">ubuntu-users@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-users" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-users</a><br>
<br></blockquote></div><br></div>