Script to configure samba share and set password automaticaly
Kevin Olbrich
kolbrich at dolphin-it.de
Fri Jan 24 19:31:50 UTC 2014
Am 24.01.2014 um 20:26 schrieb Camilo Vieira <camilo.vieira at gmail.com>:
> Hi!
>
> I'm working on Ubuntu Server 12.04 preseed instalation for the customers.
> I have trying to configure a samba share and set the password for the backup user automaticaly.
>
> I have added this lines on the post script:
>
> # SAMBA SHARE AUTO CONFIGURATION
>
> # copy the configuration
> sudo cp /opt/dgb/smb.conf /etc/samba/
>
> # set the password for the backup user
>
> sudo mksmbpasswd /etc/passwd > /tmp/samba/smbpasswd
> sudo mv /tmp/samba/smbpasswd /etc/samba/smbpasswd
> sudo chown root:root /etc/samba/smbpasswd
> sudo smbpasswd -a backup -n
> sudo mkdir /var/backups/nds
>
> sudo /etc/init.d/smbd restart
> ################################
> Anyone knows how I can set the password using smbpasswd without user intervention?
>
(echo newPassword; echo newPassword) | smbpasswd -s
Greetings,
Kevin.
> Thanks!
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20140124/d51a926c/attachment.html>
More information about the ubuntu-users
mailing list