Script to configure samba share and set password automaticaly

Camilo Vieira camilo.vieira at gmail.com
Fri Jan 24 19:33:14 UTC 2014


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?

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20140124/0eaa81c4/attachment.html>


More information about the ubuntu-users mailing list