summaryrefslogtreecommitdiff
path: root/packaging/Caldera/OpenLinux/convertsmbpasswd.perl
diff options
context:
space:
mode:
authorJohn Terpstra <jht@samba.org>2000-07-30 06:33:30 +0000
committerJohn Terpstra <jht@samba.org>2000-07-30 06:33:30 +0000
commit5dbd30002acaa971a84b6d917f9dc06d7f118836 (patch)
tree8feb2792e52b7f11cd0c3f3751d696810ae87b01 /packaging/Caldera/OpenLinux/convertsmbpasswd.perl
parentb58ebd10dee6e779fb4b977a7f55db1b23001564 (diff)
downloadsamba-5dbd30002acaa971a84b6d917f9dc06d7f118836.tar.gz
samba-5dbd30002acaa971a84b6d917f9dc06d7f118836.tar.bz2
samba-5dbd30002acaa971a84b6d917f9dc06d7f118836.zip
Adding files provided by Klaus Singvogel of Caldera
(This used to be commit ab6d01bdccf3106c00563173bfb3e3b3d7c3a64c)
Diffstat (limited to 'packaging/Caldera/OpenLinux/convertsmbpasswd.perl')
-rwxr-xr-xpackaging/Caldera/OpenLinux/convertsmbpasswd.perl15
1 files changed, 15 insertions, 0 deletions
diff --git a/packaging/Caldera/OpenLinux/convertsmbpasswd.perl b/packaging/Caldera/OpenLinux/convertsmbpasswd.perl
new file mode 100755
index 0000000000..6b83886cd4
--- /dev/null
+++ b/packaging/Caldera/OpenLinux/convertsmbpasswd.perl
@@ -0,0 +1,15 @@
+#!/usr/bin/perl -w
+#
+# Convert a Samba 1.9.18 smbpasswd file format into
+# a Samba 2.0 smbpasswd file format.
+# Read from stdin and write to stdout for simplicity.
+# Set the last change time to the time of conversion.
+while ( <> ) {
+ @V = split(/:/);
+ if ( ! /^\#/ ) {
+ $V[6] = $V[4] . "\n";
+ $V[5] = sprintf( "LCT-%X", time());
+ $V[4] = "[U ]";
+ }
+ print( join( ':', @V));
+}