Tiny Core Linux
Tiny Core Extensions => TCE Talk => Topic started by: b1ackmai1er on April 18, 2011, 06:41:45 AM
-
Is it possible to have a chpasswd for samba. i.e chsmbpasswd so we can change samba passwords in batch files
thanks
-
http://syslog.warten.de/verbose/2010/05/chsmbpasswd.html :P
-
http://syslog.warten.de/verbose/2010/05/chsmbpasswd.html :P
That script was a bit primitive, here is a smaller equivalent:
while read x; do u=${x%:*}; p=${x#*:}; echo $p$'\n'$p|smbpasswd -s -a $u; done
-
Thanks guys!
Thats so cool.
-
Hi Again,
for simplicity, is there a way of doing this inline?
Thanks
-
Hi Again,
for simplicity, is there a way of doing this inline?
Thanks
What do you mean, "inline?" You can save it as a script, say /usr/local/bin/chsmbpasswd, and make it executable with chmod +x chsmbpasswd.