svn commit: samba r5790 - in branches/SAMBA_3_0/source/utils: .

jht at samba.org jht at samba.org
Tue Mar 15 00:42:38 GMT 2005


Author: jht
Date: 2005-03-15 00:42:38 +0000 (Tue, 15 Mar 2005)
New Revision: 5790

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

Log:
Added ability to set account description.
Modified:
   branches/SAMBA_3_0/source/utils/pdbedit.c


Changeset:
Modified: branches/SAMBA_3_0/source/utils/pdbedit.c
===================================================================
--- branches/SAMBA_3_0/source/utils/pdbedit.c	2005-03-14 20:03:32 UTC (rev 5789)
+++ branches/SAMBA_3_0/source/utils/pdbedit.c	2005-03-15 00:42:38 UTC (rev 5790)
@@ -299,6 +299,7 @@
 
 static int set_user_info (struct pdb_context *in, const char *username, 
 			  const char *fullname, const char *homedir, 
+			  const char *acct_desc, 
 			  const char *drive, const char *script, 
 			  const char *profile, const char *account_control,
 			  const char *user_sid, const char *group_sid,
@@ -346,6 +347,8 @@
 
 	if (fullname)
 		pdb_set_fullname(sam_pwent, fullname, PDB_CHANGED);
+	if (acct_desc)
+		pdb_set_acct_desc(sam_pwent, acct_desc, PDB_CHANGED);
 	if (homedir)
 		pdb_set_homedir(sam_pwent, homedir, PDB_CHANGED);
 	if (drive)
@@ -641,6 +644,7 @@
 	uint32	setparms, checkparms;
 	int opt;
 	static char *full_name = NULL;
+	static char *acct_desc = NULL;
 	static const char *user_name = NULL;
 	static char *home_dir = NULL;
 	static char *home_drive = NULL;
@@ -673,13 +677,14 @@
 		{"verbose",	'v', POPT_ARG_NONE, &verbose, 0, "be verbose", NULL },
 		{"smbpasswd-style",	'w',POPT_ARG_NONE, &spstyle, 0, "give output in smbpasswd style", NULL},
 		{"user",	'u', POPT_ARG_STRING, &user_name, 0, "use username", "USER" },
+		{"account-desc",	'N', POPT_ARG_STRING, &acct_desc, 0, "set account description", NULL},
 		{"fullname",	'f', POPT_ARG_STRING, &full_name, 0, "set full name", NULL},
 		{"homedir",	'h', POPT_ARG_STRING, &home_dir, 0, "set home directory", NULL},
 		{"drive",	'D', POPT_ARG_STRING, &home_drive, 0, "set home drive", NULL},
 		{"script",	'S', POPT_ARG_STRING, &logon_script, 0, "set logon script", NULL},
 		{"profile",	'p', POPT_ARG_STRING, &profile_path, 0, "set profile path", NULL},
-		{"user SID",	'U', POPT_ARG_STRING, &user_sid, 0, "set user SID or RID", NULL},
-		{"group SID",	'G', POPT_ARG_STRING, &group_sid, 0, "set group SID or RID", NULL},
+		{"user-SID",	'U', POPT_ARG_STRING, &user_sid, 0, "set user SID or RID", NULL},
+		{"group-SID",	'G', POPT_ARG_STRING, &group_sid, 0, "set group SID or RID", NULL},
 		{"create",	'a', POPT_ARG_NONE, &add_user, 0, "create user", NULL},
 		{"modify",	'r', POPT_ARG_NONE, &modify_user, 0, "modify user", NULL},
 		{"machine",	'm', POPT_ARG_NONE, &machine, 0, "account is a machine account", NULL},
@@ -960,6 +965,7 @@
 			}
 			return set_user_info (bdef, user_name, full_name,
 					      home_dir,
+					      acct_desc,
 					      home_drive,
 					      logon_script,
 					      profile_path, account_control,



More information about the samba-cvs mailing list