svn commit: samba r12749 - in branches/SAMBA_4_0/source: scripting/libjs setup

abartlet at samba.org abartlet at samba.org
Fri Jan 6 21:45:36 GMT 2006


Author: abartlet
Date: 2006-01-06 21:45:36 +0000 (Fri, 06 Jan 2006)
New Revision: 12749

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=12749

Log:
Fix the newuser script.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/scripting/libjs/provision.js
   branches/SAMBA_4_0/source/setup/newuser


Changeset:
Modified: branches/SAMBA_4_0/source/scripting/libjs/provision.js
===================================================================
--- branches/SAMBA_4_0/source/scripting/libjs/provision.js	2006-01-06 21:39:37 UTC (rev 12748)
+++ branches/SAMBA_4_0/source/scripting/libjs/provision.js	2006-01-06 21:45:36 UTC (rev 12749)
@@ -406,7 +406,7 @@
 /*
   add a new user record
 */
-function newuser(username, unixname, password, message, subobj, session_info, credentials)
+function newuser(username, unixname, password, message, session_info, credentials)
 {
 	var lp = loadparm_init();
 	var samdb = lp.get("sam database");
@@ -437,15 +437,13 @@
 	var ldif = sprintf("
 dn: %s
 sAMAccountName: %s
-name: %s
 memberOf: %s
 unixName: %s
-objectGUID: %s
-unicodePwd: %s
+sambaPassword: %s
 objectClass: user
 ",
-			   user_dn, username, username, dom_users,
-			   unixname, randguid(), password);
+			   user_dn, username, dom_users,
+			   unixname, password);
 	/*
 	  add the user to the users group as well
 	*/

Modified: branches/SAMBA_4_0/source/setup/newuser
===================================================================
--- branches/SAMBA_4_0/source/setup/newuser	2006-01-06 21:39:37 UTC (rev 12748)
+++ branches/SAMBA_4_0/source/setup/newuser	2006-01-06 21:45:36 UTC (rev 12749)
@@ -10,6 +10,7 @@
 		"POPT_AUTOHELP",
 		"POPT_COMMON_SAMBA",
 		"POPT_COMMON_VERSION",
+		"POPT_COMMON_CREDENTIALS",
 		'username=s',
 		'unixname=s',
 		'password=s',
@@ -70,6 +71,10 @@
 	exit(1);
 }
 
-newuser(options.username, options.unixname, options.password, message);
+var creds = options.get_credentials();
+var system_session = system_session();
 
+
+newuser(options.username, options.unixname, options.password, message, system_session, creds);
+
 return 0;



More information about the samba-cvs mailing list