signed / unsigned warnings (found by herb).
[samba.git] / source3 / rpcclient / cmd_samr.c
1 /* 
2    Unix SMB/Netbios implementation.
3    Version 1.9.
4    NT Domain Authentication SMB / MSRPC client
5    Copyright (C) Andrew Tridgell 1994-1997
6    Copyright (C) Luke Kenneth Casson Leighton 1996-1997
7    
8    This program is free software; you can redistribute it and/or modify
9    it under the terms of the GNU General Public License as published by
10    the Free Software Foundation; either version 2 of the License, or
11    (at your option) any later version.
12    
13    This program is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17    
18    You should have received a copy of the GNU General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */
22
23
24
25 #ifdef SYSLOG
26 #undef SYSLOG
27 #endif
28
29 #include "includes.h"
30 #include "nterr.h"
31
32 extern int DEBUGLEVEL;
33
34 #define DEBUG_TESTING
35
36 extern struct cli_state *smb_cli;
37
38 extern FILE* out_hnd;
39
40
41 /****************************************************************************
42 SAM password change
43 ****************************************************************************/
44 void cmd_sam_ntchange_pwd(struct client_info *info)
45 {
46         fstring srv_name;
47         fstring domain;
48         fstring sid;
49         char *new_passwd;
50         BOOL res = True;
51         char nt_newpass[516];
52         uchar nt_hshhash[16];
53         uchar nt_newhash[16];
54         uchar nt_oldhash[16];
55         char lm_newpass[516];
56         uchar lm_newhash[16];
57         uchar lm_hshhash[16];
58         uchar lm_oldhash[16];
59
60         fstrcpy(sid   , info->dom.level5_sid);
61         fstrcpy(domain, info->dom.level5_dom);
62
63         fstrcpy(srv_name, "\\\\");
64         fstrcat(srv_name, info->dest_host);
65         strupper(srv_name);
66
67         fprintf(out_hnd, "SAM NT Password Change\n");
68
69 #if 0
70         struct pwd_info new_pwd;
71         pwd_read(&new_pwd, "New Password (ONCE: this is test code!):", True);
72 #endif
73         new_passwd = (char*)getpass("New Password (ONCE ONLY - get it right :-)");
74
75         nt_lm_owf_gen(new_passwd, lm_newhash, nt_newhash);
76         pwd_get_lm_nt_16(&(smb_cli->pwd), lm_oldhash, nt_oldhash );
77         make_oem_passwd_hash(nt_newpass, new_passwd, nt_oldhash, True);
78         make_oem_passwd_hash(lm_newpass, new_passwd, lm_oldhash, True);
79         E_old_pw_hash(lm_newhash, lm_oldhash, lm_hshhash);
80         E_old_pw_hash(lm_newhash, nt_oldhash, nt_hshhash);
81
82         cli_nt_set_ntlmssp_flgs(smb_cli,
83                                     NTLMSSP_NEGOTIATE_UNICODE |
84                                     NTLMSSP_NEGOTIATE_OEM |
85                                     NTLMSSP_NEGOTIATE_SIGN |
86                                     NTLMSSP_NEGOTIATE_SEAL |
87                                     NTLMSSP_NEGOTIATE_LM_KEY |
88                                     NTLMSSP_NEGOTIATE_NTLM |
89                                     NTLMSSP_NEGOTIATE_ALWAYS_SIGN |
90                                     NTLMSSP_NEGOTIATE_00001000 |
91                                     NTLMSSP_NEGOTIATE_00002000);
92
93         /* open SAMR session.  */
94         res = res ? cli_nt_session_open(smb_cli, PIPE_SAMR) : False;
95
96         /* establish a connection. */
97         res = res ? do_samr_unknown_38(smb_cli, srv_name) : False;
98
99         /* establish a connection. */
100         res = res ? do_samr_chgpasswd_user(smb_cli,
101                                            srv_name, smb_cli->user_name,
102                                            nt_newpass, (char*)nt_hshhash,
103                                            lm_newpass, (char*)lm_hshhash) : False;
104         /* close the session */
105         cli_nt_session_close(smb_cli);
106
107         if (res)
108         {
109                 fprintf(out_hnd, "NT Password changed OK\n");
110         }
111         else
112         {
113                 fprintf(out_hnd, "NT Password change FAILED\n");
114         }
115 }
116
117
118 /****************************************************************************
119 experimental SAM encryted rpc test connection
120 ****************************************************************************/
121 void cmd_sam_test(struct client_info *info)
122 {
123         fstring srv_name;
124         fstring domain;
125         fstring sid;
126         BOOL res = True;
127
128         fstrcpy(sid   , info->dom.level5_sid);
129         fstrcpy(domain, info->dom.level5_dom);
130
131 /*
132         if (strlen(sid) == 0)
133         {
134                 fprintf(out_hnd, "please use 'lsaquery' first, to ascertain the SID\n");
135                 return;
136         }
137 */
138         fstrcpy(srv_name, "\\\\");
139         fstrcat(srv_name, info->dest_host);
140         strupper(srv_name);
141
142         fprintf(out_hnd, "SAM Encryption Test\n");
143
144         cli_nt_set_ntlmssp_flgs(smb_cli,
145                                     NTLMSSP_NEGOTIATE_UNICODE |
146                                     NTLMSSP_NEGOTIATE_OEM |
147                                     NTLMSSP_NEGOTIATE_SIGN |
148                                     NTLMSSP_NEGOTIATE_SEAL |
149                                     NTLMSSP_NEGOTIATE_LM_KEY |
150                                     NTLMSSP_NEGOTIATE_NTLM |
151                                     NTLMSSP_NEGOTIATE_ALWAYS_SIGN |
152                                     NTLMSSP_NEGOTIATE_00001000 |
153                                     NTLMSSP_NEGOTIATE_00002000);
154
155         /* open SAMR session.  */
156         res = res ? cli_nt_session_open(smb_cli, PIPE_SAMR) : False;
157
158         /* establish a connection. */
159         res = res ? do_samr_unknown_38(smb_cli, srv_name) : False;
160
161         /* close the session */
162         cli_nt_session_close(smb_cli);
163
164         if (res)
165         {
166                 DEBUG(5,("cmd_sam_test: succeeded\n"));
167         }
168         else
169         {
170                 DEBUG(5,("cmd_sam_test: failed\n"));
171         }
172 }
173
174
175 /****************************************************************************
176 experimental SAM users enum.
177 ****************************************************************************/
178 void cmd_sam_enum_users(struct client_info *info)
179 {
180         fstring srv_name;
181         fstring domain;
182         fstring sid;
183         DOM_SID sid1;
184         int user_idx;
185         BOOL res = True;
186         BOOL request_user_info  = False;
187         BOOL request_group_info = False;
188         uint16 num_entries = 0;
189         uint16 unk_0 = 0x0;
190         uint16 acb_mask = 0;
191         uint16 unk_1 = 0x0;
192         uint32 admin_rid = 0x304; /* absolutely no idea. */
193         fstring tmp;
194
195         fstrcpy(sid   , info->dom.level5_sid);
196         fstrcpy(domain, info->dom.level5_dom);
197
198         if (strlen(sid) == 0)
199         {
200                 fprintf(out_hnd, "please use 'lsaquery' first, to ascertain the SID\n");
201                 return;
202         }
203
204         make_dom_sid(&sid1, sid);
205
206         fstrcpy(srv_name, "\\\\");
207         fstrcat(srv_name, info->dest_host);
208         strupper(srv_name);
209
210         /* a bad way to do token parsing... */
211         if (next_token(NULL, tmp, NULL, sizeof(tmp)))
212         {
213                 request_user_info  |= strequal(tmp, "-u");
214                 request_group_info |= strequal(tmp, "-g");
215         }
216
217         if (next_token(NULL, tmp, NULL, sizeof(tmp)))
218         {
219                 request_user_info  |= strequal(tmp, "-u");
220                 request_group_info |= strequal(tmp, "-g");
221         }
222
223 #ifdef DEBUG_TESTING
224         if (next_token(NULL, tmp, NULL, sizeof(tmp)))
225         {
226                 num_entries = (uint16)strtol(tmp, (char**)NULL, 16);
227         }
228
229         if (next_token(NULL, tmp, NULL, sizeof(tmp)))
230         {
231                 unk_0 = (uint16)strtol(tmp, (char**)NULL, 16);
232         }
233
234         if (next_token(NULL, tmp, NULL, sizeof(tmp)))
235         {
236                 acb_mask = (uint16)strtol(tmp, (char**)NULL, 16);
237         }
238
239         if (next_token(NULL, tmp, NULL, sizeof(tmp)))
240         {
241                 unk_1 = (uint16)strtol(tmp, (char**)NULL, 16);
242         }
243 #endif
244
245         fprintf(out_hnd, "SAM Enumerate Users\n");
246         fprintf(out_hnd, "From: %s To: %s Domain: %s SID: %s\n",
247                           info->myhostname, srv_name, domain, sid);
248
249 #ifdef DEBUG_TESTING
250         DEBUG(5,("Number of entries:%d unk_0:%04x acb_mask:%04x unk_1:%04x\n",
251                   num_entries, unk_0, acb_mask, unk_1));
252 #endif
253
254         /* open SAMR session.  negotiate credentials */
255         res = res ? cli_nt_session_open(smb_cli, PIPE_SAMR) : False;
256
257         /* establish a connection. */
258         res = res ? do_samr_connect(smb_cli, 
259                                 srv_name, 0x00000020,
260                                 &info->dom.samr_pol_connect) : False;
261
262         /* connect to the domain */
263         res = res ? do_samr_open_domain(smb_cli, 
264                     &info->dom.samr_pol_connect, admin_rid, &sid1,
265                     &info->dom.samr_pol_open_domain) : False;
266
267         /* read some users */
268         res = res ? do_samr_enum_dom_users(smb_cli, 
269                                 &info->dom.samr_pol_open_domain,
270                     num_entries, unk_0, acb_mask, unk_1, 0xffff,
271                                 &info->dom.sam, &info->dom.num_sam_entries) : False;
272
273         if (res && info->dom.num_sam_entries == 0)
274         {
275                 fprintf(out_hnd, "No users\n");
276         }
277
278         if (request_user_info || request_group_info)
279         {
280                 /* query all the users */
281                 user_idx = 0;
282
283                 while (res && user_idx < info->dom.num_sam_entries)
284                 {
285                         uint32 user_rid = info->dom.sam[user_idx].smb_userid;
286                         SAM_USER_INFO_21 usr;
287
288                         fprintf(out_hnd, "User RID: %8x  User Name: %s\n",
289                                           user_rid,
290                                           info->dom.sam[user_idx].acct_name);
291
292                         if (request_user_info)
293                         {
294                                 /* send user info query, level 0x15 */
295                                 if (get_samr_query_userinfo(smb_cli,
296                                                         &info->dom.samr_pol_open_domain,
297                                                         0x15, user_rid, &usr))
298                                 {
299                                         display_sam_user_info_21(out_hnd, ACTION_HEADER   , &usr);
300                                         display_sam_user_info_21(out_hnd, ACTION_ENUMERATE, &usr);
301                                         display_sam_user_info_21(out_hnd, ACTION_FOOTER   , &usr);
302                                 }
303                         }
304
305                         if (request_group_info)
306                         {
307                                 uint32 num_groups;
308                                 DOM_GID gid[LSA_MAX_GROUPS];
309
310                                 /* send user group query */
311                                 if (get_samr_query_usergroups(smb_cli,
312                                                         &info->dom.samr_pol_open_domain,
313                                                         user_rid, &num_groups, gid))
314                                 {
315                                         display_group_rid_info(out_hnd, ACTION_HEADER   , num_groups, gid);
316                                         display_group_rid_info(out_hnd, ACTION_ENUMERATE, num_groups, gid);
317                                         display_group_rid_info(out_hnd, ACTION_FOOTER   , num_groups, gid);
318                                 }
319                         }
320
321                         user_idx++;
322                 }
323         }
324
325         res = res ? do_samr_close(smb_cli,
326                     &info->dom.samr_pol_open_domain) : False;
327
328         res = res ? do_samr_close(smb_cli,
329                     &info->dom.samr_pol_connect) : False;
330
331         /* close the session */
332         cli_nt_session_close(smb_cli);
333
334         if (info->dom.sam != NULL)
335         {
336                 free(info->dom.sam);
337         }
338
339         if (res)
340         {
341                 DEBUG(5,("cmd_sam_enum_users: succeeded\n"));
342         }
343         else
344         {
345                 DEBUG(5,("cmd_sam_enum_users: failed\n"));
346         }
347 }
348
349
350 /****************************************************************************
351 experimental SAM user query.
352 ****************************************************************************/
353 void cmd_sam_query_user(struct client_info *info)
354 {
355         fstring srv_name;
356         fstring domain;
357         fstring sid;
358         DOM_SID sid1;
359         int user_idx = 0;  /* FIXME maybe ... */
360         BOOL res = True;
361         uint32 admin_rid = 0x304; /* absolutely no idea. */
362         fstring rid_str ;
363         fstring info_str;
364         uint32 user_rid = 0;
365         uint32 info_level = 0x15;
366
367         SAM_USER_INFO_21 usr;
368
369         fstrcpy(sid   , info->dom.level5_sid);
370         fstrcpy(domain, info->dom.level5_dom);
371
372         if (strlen(sid) == 0)
373         {
374                 fprintf(out_hnd, "please use 'lsaquery' first, to ascertain the SID\n");
375                 return;
376         }
377
378         make_dom_sid(&sid1, sid);
379
380         fstrcpy(srv_name, "\\\\");
381         fstrcat(srv_name, info->dest_host);
382         strupper(srv_name);
383
384         if (next_token(NULL, rid_str , NULL, sizeof(rid_str )) &&
385             next_token(NULL, info_str, NULL, sizeof(info_str)))
386         {
387                 user_rid   = (uint32)strtol(rid_str , (char**)NULL, 16);
388                 info_level = (uint32)strtol(info_str, (char**)NULL, 10);
389         }
390
391         fprintf(out_hnd, "SAM Query User: rid %x info level %d\n",
392                           user_rid, info_level);
393         fprintf(out_hnd, "From: %s To: %s Domain: %s SID: %s\n",
394                           info->myhostname, srv_name, domain, sid);
395
396         /* open SAMR session.  negotiate credentials */
397         res = res ? cli_nt_session_open(smb_cli, PIPE_SAMR) : False;
398
399         /* establish a connection. */
400         res = res ? do_samr_connect(smb_cli,
401                                 srv_name, 0x00000020,
402                                 &info->dom.samr_pol_connect) : False;
403
404         /* connect to the domain */
405         res = res ? do_samr_open_domain(smb_cli,
406                     &info->dom.samr_pol_connect, admin_rid, &sid1,
407                     &info->dom.samr_pol_open_domain) : False;
408
409         fprintf(out_hnd, "User RID: %8x  User Name: %s\n",
410                           user_rid,
411                           info->dom.sam[user_idx].acct_name);
412
413         /* send user info query, level */
414         if (get_samr_query_userinfo(smb_cli,
415                                         &info->dom.samr_pol_open_domain,
416                                         info_level, user_rid, &usr))
417         {
418                 if (info_level == 0x15)
419                 {
420                         display_sam_user_info_21(out_hnd, ACTION_HEADER   , &usr);
421                         display_sam_user_info_21(out_hnd, ACTION_ENUMERATE, &usr);
422                         display_sam_user_info_21(out_hnd, ACTION_FOOTER   , &usr);
423                 }
424         }
425
426         res = res ? do_samr_close(smb_cli,
427                     &info->dom.samr_pol_connect) : False;
428
429         res = res ? do_samr_close(smb_cli,
430                     &info->dom.samr_pol_open_domain) : False;
431
432         /* close the session */
433         cli_nt_session_close(smb_cli);
434
435         if (res)
436         {
437                 DEBUG(5,("cmd_sam_query_user: succeeded\n"));
438         }
439         else
440         {
441                 DEBUG(5,("cmd_sam_query_user: failed\n"));
442         }
443 }
444
445
446 /****************************************************************************
447 experimental SAM groups query.
448 ****************************************************************************/
449 void cmd_sam_query_groups(struct client_info *info)
450 {
451         fstring srv_name;
452         fstring domain;
453         fstring sid;
454         DOM_SID sid1;
455         BOOL res = True;
456         fstring info_str;
457         uint32 switch_value = 2;
458         uint32 admin_rid = 0x304; /* absolutely no idea. */
459
460         fstrcpy(sid   , info->dom.level5_sid);
461         fstrcpy(domain, info->dom.level5_dom);
462
463         if (strlen(sid) == 0)
464         {
465                 fprintf(out_hnd, "please use 'lsaquery' first, to ascertain the SID\n");
466                 return;
467         }
468
469         make_dom_sid(&sid1, sid);
470
471         fstrcpy(srv_name, "\\\\");
472         fstrcat(srv_name, info->dest_host);
473         strupper(srv_name);
474
475         if (next_token(NULL, info_str, NULL, sizeof(info_str)))
476         {
477                 switch_value = (uint32)strtol(info_str, (char**)NULL, 10);
478         }
479
480         fprintf(out_hnd, "SAM Query Groups: info level %d\n", switch_value);
481         fprintf(out_hnd, "From: %s To: %s Domain: %s SID: %s\n",
482                           info->myhostname, srv_name, domain, sid);
483
484         /* open SAMR session.  negotiate credentials */
485         res = res ? cli_nt_session_open(smb_cli, PIPE_SAMR) : False;
486
487         /* establish a connection. */
488         res = res ? do_samr_connect(smb_cli, 
489                                 srv_name, 0x00000020,
490                                 &info->dom.samr_pol_connect) : False;
491
492         /* connect to the domain */
493         res = res ? do_samr_open_domain(smb_cli, 
494                     &info->dom.samr_pol_connect, admin_rid, &sid1,
495                     &info->dom.samr_pol_open_domain) : False;
496
497         /* send a samr 0x8 command */
498         res = res ? do_samr_unknown_8(smb_cli,
499                     &info->dom.samr_pol_open_domain, switch_value) : False;
500
501         res = res ? do_samr_close(smb_cli,
502                     &info->dom.samr_pol_connect) : False;
503
504         res = res ? do_samr_close(smb_cli, 
505                     &info->dom.samr_pol_open_domain) : False;
506
507         /* close the session */
508         cli_nt_session_close(smb_cli);
509
510         if (res)
511         {
512                 DEBUG(5,("cmd_sam_query_groups: succeeded\n"));
513         }
514         else
515         {
516                 DEBUG(5,("cmd_sam_query_groups: failed\n"));
517         }
518 }
519
520
521 /****************************************************************************
522 experimental SAM aliases query.
523 ****************************************************************************/
524 void cmd_sam_enum_aliases(struct client_info *info)
525 {
526         fstring srv_name;
527         fstring domain;
528         fstring sid;
529         DOM_SID sid1;
530         BOOL res = True;
531         BOOL request_user_info  = False;
532         BOOL request_alias_info = False;
533         uint32 admin_rid = 0x304; /* absolutely no idea. */
534         fstring tmp;
535
536         uint32 num_aliases = 3;
537         uint32 alias_rid[3] = { DOMAIN_GROUP_RID_ADMINS, DOMAIN_GROUP_RID_USERS, DOMAIN_GROUP_RID_GUESTS };
538         fstring alias_names [3];
539         uint32  num_als_usrs[3];
540
541         fstrcpy(sid   , info->dom.level3_sid);
542         fstrcpy(domain, info->dom.level3_dom);
543 #if 0
544         fstrcpy(sid   , "S-1-5-20");
545 #endif
546         if (strlen(sid) == 0)
547         {
548                 fprintf(out_hnd, "please use 'lsaquery' first, to ascertain the SID\n");
549                 return;
550         }
551
552         make_dom_sid(&sid1, sid);
553
554         fstrcpy(srv_name, "\\\\");
555         fstrcat(srv_name, info->dest_host);
556         strupper(srv_name);
557
558         /* a bad way to do token parsing... */
559         if (next_token(NULL, tmp, NULL, sizeof(tmp)))
560         {
561                 request_user_info  |= strequal(tmp, "-u");
562                 request_alias_info |= strequal(tmp, "-g");
563         }
564
565         if (next_token(NULL, tmp, NULL, sizeof(tmp)))
566         {
567                 request_user_info  |= strequal(tmp, "-u");
568                 request_alias_info |= strequal(tmp, "-g");
569         }
570
571         fprintf(out_hnd, "SAM Enumerate Aliases\n");
572         fprintf(out_hnd, "From: %s To: %s Domain: %s SID: %s\n",
573                           info->myhostname, srv_name, domain, sid);
574
575         /* open SAMR session.  negotiate credentials */
576         res = res ? cli_nt_session_open(smb_cli, PIPE_SAMR) : False;
577
578         /* establish a connection. */
579         res = res ? do_samr_connect(smb_cli,
580                                 srv_name, 0x00000020,
581                                 &info->dom.samr_pol_connect) : False;
582
583         /* connect to the domain */
584         res = res ? do_samr_open_domain(smb_cli,
585                     &info->dom.samr_pol_connect, admin_rid, &sid1,
586                     &info->dom.samr_pol_open_domain) : False;
587
588         /* send a query on the aliase */
589         res = res ? do_samr_query_unknown_12(smb_cli,
590                     &info->dom.samr_pol_open_domain, admin_rid, num_aliases, alias_rid,
591                     &num_aliases, alias_names, num_als_usrs) : False;
592
593         if (res)
594         {
595                 display_alias_name_info(out_hnd, ACTION_HEADER   , num_aliases, alias_names, num_als_usrs);
596                 display_alias_name_info(out_hnd, ACTION_ENUMERATE, num_aliases, alias_names, num_als_usrs);
597                 display_alias_name_info(out_hnd, ACTION_FOOTER   , num_aliases, alias_names, num_als_usrs);
598         }
599
600 #if 0
601
602         /* read some users */
603         res = res ? do_samr_enum_dom_users(smb_cli,
604                                 &info->dom.samr_pol_open_domain,
605                     num_entries, unk_0, acb_mask, unk_1, 0xffff,
606                                 info->dom.sam, &info->dom.num_sam_entries) : False;
607
608         if (res && info->dom.num_sam_entries == 0)
609         {
610                 fprintf(out_hnd, "No users\n");
611         }
612
613         if (request_user_info || request_alias_info)
614         {
615                 /* query all the users */
616                 user_idx = 0;
617
618                 while (res && user_idx < info->dom.num_sam_entries)
619                 {
620                         uint32 user_rid = info->dom.sam[user_idx].smb_userid;
621                         SAM_USER_INFO_21 usr;
622
623                         fprintf(out_hnd, "User RID: %8x  User Name: %s\n",
624                                           user_rid,
625                                           info->dom.sam[user_idx].acct_name);
626
627                         if (request_user_info)
628                         {
629                                 /* send user info query, level 0x15 */
630                                 if (get_samr_query_userinfo(smb_cli,
631                                                         &info->dom.samr_pol_open_domain,
632                                                         0x15, user_rid, &usr))
633                                 {
634                                         display_sam_user_info_21(out_hnd, ACTION_HEADER   , &usr);
635                                         display_sam_user_info_21(out_hnd, ACTION_ENUMERATE, &usr);
636                                         display_sam_user_info_21(out_hnd, ACTION_FOOTER   , &usr);
637                                 }
638                         }
639
640                         if (request_alias_info)
641                         {
642                                 uint32 num_aliases;
643                                 DOM_GID gid[LSA_MAX_GROUPS];
644
645                                 /* send user aliase query */
646                                 if (get_samr_query_useraliases(smb_cli, 
647                                                         &info->dom.samr_pol_open_domain,
648                                                         user_rid, &num_aliases, gid))
649                                 {
650                                         display_alias_info(out_hnd, ACTION_HEADER   , num_aliases, gid);
651                                         display_alias_info(out_hnd, ACTION_ENUMERATE, num_aliases, gid);
652                                         display_alias_info(out_hnd, ACTION_FOOTER   , num_aliases, gid);
653                                 }
654                         }
655
656                         user_idx++;
657                 }
658         }
659 #endif
660
661         res = res ? do_samr_close(smb_cli, 
662                     &info->dom.samr_pol_connect) : False;
663
664         res = res ? do_samr_close(smb_cli,
665                     &info->dom.samr_pol_open_domain) : False;
666
667         /* close the session */
668         cli_nt_session_close(smb_cli);
669
670         if (res)
671         {
672                 DEBUG(5,("cmd_sam_enum_users: succeeded\n"));
673         }
674         else
675         {
676                 DEBUG(5,("cmd_sam_enum_users: failed\n"));
677         }
678 }
679
680