s4:schema Update Windows 2008 schema from Microsoft to latest version
[ira/wip.git] / source4 / setup / setpassword
old mode 100644 (file)
new mode 100755 (executable)
index 977a6a5..90a217f
@@ -1,17 +1,36 @@
 #!/usr/bin/python
 #
-#      add a new user to a Samba4 server
-#      Copyright Andrew Tridgell 2005
-#      Copyright Jelmer Vernooij 2008
-#      Released under the GNU GPL version 3 or later
+# Add a new user to a Samba4 server
+# Copyright Jelmer Vernooij 2008
 #
+# Based on the original in EJS:
+# Copyright Andrew Tridgell 2005
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#   
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#   
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+import os, sys
+
+# Find right directory when running from source tree
+sys.path.insert(0, "bin/python")
 
 import samba.getopt as options
 import optparse
 import pwd
 import sys
 from getpass import getpass
-from auth import system_session
+from samba.auth import system_session
 from samba.samdb import SamDB
 
 parser = optparse.OptionParser("setpassword [username] [options]")