source: npl/fileserver/smb-ldap-tool/modified/smbldap-usermod @ 37aaf89

Last change on this file since 37aaf89 was 3187b26, checked in by Edwin Eefting <edwin@datux.nl>, 7 years ago

flush nscd cache when modifying users

  • Property mode set to 100755
File size: 19.8 KB
Line 
1#!/usr/bin/perl -w
2
3# $Id: smbldap-usermod 5894 2012-09-28 10:09:27Z edwin $
4#
5#  This code was developped by IDEALX (http://IDEALX.org/) and
6#  contributors (their names can be found in the CONTRIBUTORS file).
7#
8#                 Copyright (C) 2001-2002 IDEALX
9#
10#  This program is free software; you can redistribute it and/or
11#  modify it under the terms of the GNU General Public License
12#  as published by the Free Software Foundation; either version 2
13#  of the License, or (at your option) any later version.
14#
15#  This program is distributed in the hope that it will be useful,
16#  but WITHOUT ANY WARRANTY; without even the implied warranty of
17#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18#  GNU General Public License for more details.
19#
20#  You should have received a copy of the GNU General Public License
21#  along with this program; if not, write to the Free Software
22#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
23#  USA.
24
25# Purpose of smbldap-usermod : user (posix,shadow,samba) modification
26
27use strict;
28use FindBin;
29use FindBin qw($RealBin);
30use lib "$RealBin/";
31use smbldap_tools;
32
33#####################
34
35use Getopt::Std;
36my %Options;
37my $nscd_status;
38
39my $ok = getopts('A:B:C:D:E:F:O:H:IJM:n:N:S:PT:ame:f:u:g:G:d:l:r:s:c:ok:?hzZxX', \%Options);
40if ( (!$ok) || (@ARGV < 1) || ($Options{'?'}) || ($Options{'h'}) ) {
41  print_banner;
42  print "Usage: $0 [-awmugdsckABCDEFGHIPSMT?h] username\n";
43  print "Available options are:\n";
44  print "  -c    gecos\n";
45  print "  -d    home directory\n";
46  #print "  -m    move home directory\n";
47  #print "  -f    inactive days\n";
48  print "  -r    new username (cn, sn and dn are updated)\n";
49  print "  -u    uid\n";
50  print "  -o    uid can be non unique\n";
51  print "  -O    Organisatie\n";
52  print "  -g    gid\n";
53  print "  -G    supplementary groups (comma separated)\n";
54  print "  -s    shell\n";
55  print "  -n    givenName (first name)\n";
56  print "  -N    canonical name\n";
57  print "  -S    surname\n";
58  print "  -P    ends by invoking smbldap-passwd\n";
59  print " For samba users:\n";
60  print "  -a    add sambaSAMAccount objectclass\n";
61  print "  -e    expire date (\"YYYY-MM-DD HH:MM:SS\")\n";
62  print "  -A    can change password ? 0 if no, 1 if yes\n";
63  print "  -B    must change password ? 0 if no, 1 if yes\n";
64  print "  -C    sambaHomePath (SMB home share, like '\\\\PDC-SRV\\homes')\n";
65  print "  -D    sambaHomeDrive (letter associated with home share, like 'H:')\n";
66  print "  -E    sambaLogonScript (DOS script to execute on login)\n";
67  print "  -F    sambaProfilePath (profile directory, like '\\\\PDC-SRV\\profiles\\foo')\n";
68  print "  -H    sambaAcctFlags (samba account control bits like '[NDHTUMWSLKI]')\n";
69  print "  -I    disable an user. Can't be used with -H or -J\n";
70  print "  -J    enable an user. Can't be used with -H or -I\n";
71  print "  -M    mailAddresses (comma seperated)\n";
72  print "  -T    mailToAddress (forward address) (comma seperated)\n";
73  print " For zarafa users:\n";
74  print "  -X    Enable Zarafa usage for this user.\n";
75  print "  -x    Disable Zarafa usage for this user.\n";
76  print "  -Z    Enable Zarafa admin rights.\n";
77  print "  -z    Disable Zarafa admin rights.\n";
78  print "  -?|-h show this help message\n";
79  exit (1);
80}
81
82if ($< != 0) {
83  print "You must be root to modify an user\n";
84  exit (1);
85}
86# Read only first @ARGV
87my $user = $ARGV[0];
88
89# Let's connect to the directory first
90my $ldap_master=connect_ldap_master();
91
92# Read user data
93my $user_entry = read_user_entry($user);
94if (!defined($user_entry)) {
95  print "$0: user $user doesn't exist\n";
96  exit (1);
97}
98
99my $samba = 0;
100if (grep ($_ =~ /^sambaSamAccount$/i, $user_entry->get_value('objectClass'))) {
101  $samba = 1;
102}
103
104# get the dn of the user
105my $dn= $user_entry->dn();
106
107my $tmp;
108my @mods;
109my @dels;
110if (defined($tmp = $Options{'a'})) {
111  # Let's connect to the directory first
112  my $winmagic = 2147483647;
113  my $valpwdcanchange = 0;
114  my $valpwdmustchange = $winmagic;
115  my $valpwdlastset = 0;
116  my $valacctflags = "[UX]";
117  my $user_entry=read_user_entry($user);
118  my $uidNumber = $user_entry->get_value('uidNumber');
119  my $userRid = 2 * $uidNumber + 1000;
120  # apply changes
121  my $modify = $ldap_master->modify ( "$dn",
122                                      changes => [
123                                                  add => [objectClass => 'sambaSAMAccount'],
124                                                  add => [sambaPwdLastSet => "$valpwdlastset"],
125                                                  add => [sambaLogonTime => '0'],
126                                                  add => [sambaLogoffTime => '2147483647'],
127                                                  add => [sambaKickoffTime => '2147483647'],
128                                                  add => [sambaPwdCanChange => "$valpwdcanchange"],
129                                                  add => [sambaPwdMustChange => "$valpwdmustchange"],
130                                                  add => [displayName => "$config{userGecos}"],
131                                                  add => [sambaSID=> "$config{SID}-$userRid"],
132                                                  add => [sambaAcctFlags => "$valacctflags"],
133                                                 ]
134                                    );
135  $modify->code && warn "failed to modify entry: ", $modify->error ;
136}
137
138# Process options
139my $changed_uid;
140my $_userUidNumber;
141my $_userRid;
142if (defined($tmp = $Options{'u'})) {
143  if (defined($Options{'o'})) {
144    $nscd_status = system "/etc/init.d/nscd status >/dev/null 2>&1";
145
146    if ($nscd_status == 0) {
147      system "/etc/init.d/nscd stop > /dev/null 2>&1";
148    }
149
150    if (getpwuid($tmp)) {
151      if ($nscd_status == 0) {
152        system "/etc/init.d/nscd start > /dev/null 2>&1";
153      }
154      system "nscd -i passwd; nscd -i group";
155
156      print "$0: uid number $tmp exists\n";
157      exit (6);
158    }
159    if ($nscd_status == 0) {
160      system "/etc/init.d/nscd start > /dev/null 2>&1";
161    }
162
163  }
164  push(@mods, 'uidNumber', $tmp);
165  $_userUidNumber = $tmp;
166  if ($samba) {
167    # as rid we use 2 * uid + 1000
168    my $_userRid = 2 * $_userUidNumber + 1000;
169    if (defined($Options{'x'})) {
170      $_userRid= sprint("%x", $_userRid);
171    }
172    push(@mods, 'sambaSID', $config{SID}.'-'.$_userRid);
173  }
174  $changed_uid = 1;
175}
176
177my $changed_gid;
178my $_userGidNumber;
179my $_userGroupSID;
180if (defined($tmp = $Options{'g'})) {
181  $_userGidNumber = parse_group($tmp);
182  if ($_userGidNumber < 0) {
183    print "$0: group $tmp doesn't exist\n";
184    exit (6);
185  }
186  push(@mods, 'gidNumber', $_userGidNumber);
187  if ($samba) {
188    # as grouprid we use the sambaSID attribute's value of the group
189    my $group_entry = read_group_entry_gid($_userGidNumber);
190    my $_userGroupSID = $group_entry->get_value('sambaSID');
191    unless ($_userGroupSID) {
192      print "Error: sambaPrimaryGroupSid could not be set (sambaSID for group $_userGidNumber does not exist\n";
193      exit (7);
194    }
195    push(@mods, 'sambaPrimaryGroupSid', $_userGroupSID);
196  }
197  $changed_gid = 1;
198}
199
200if (defined($tmp = $Options{'s'})) {
201  push(@mods, 'loginShell' => $tmp);
202}
203
204if (defined($tmp = $Options{'O'})) {
205  push(@mods, 'o' => $tmp);
206}
207
208
209
210if (defined($tmp = $Options{'c'})) {
211  push(@mods, 'gecos' => $tmp,
212       'description' => $tmp);
213  if ($samba == 1) {
214    push(@mods, 'displayName' => $tmp);
215  }
216}
217
218if (defined($tmp = $Options{'d'})) {
219  push(@mods, 'homeDirectory' => $tmp);
220}
221
222if (defined($tmp = $Options{'N'})) {
223  push(@mods, 'cn' => $tmp);
224}
225
226#added by datux to set given name for OX
227if (defined($tmp = $Options{'n'})) {
228  push(@mods, 'givenName' => $tmp);
229}
230
231if (defined($tmp = $Options{'S'})) {
232  push(@mods, 'sn' => $tmp);
233}
234
235my $mailobj = 0;
236#Omgehacked voor open exchange: (alias ipv mail, en geen maillocaladress)
237if ($tmp= $Options{'M'}) {
238    # action si + or - for adding or deleting an entry
239    my $action= '';
240    if ($tmp =~ s/^([+-])+\s*//) {
241        $action= $1;
242    }
243    my @userMailLocal = &split_arg_comma($tmp);
244    my @mail;
245    foreach my $m (@userMailLocal) {
246        my $domain = $config{mailDomain};
247        if ($m =~ /^(.+)@/) {
248            push (@mail, $m);
249            # mailLocalAddress contains only the first part
250            $m= $1;
251        } else {
252            push(@mail, $m.($domain ? '@'.$domain : ''));
253        }
254    }
255    if ($action) {
256        #my @old_MailLocal;
257        my @old_mail;
258        @old_mail = $user_entry->get_value('alias');
259        # @old_MailLocal = $user_entry->get_value('mailLocalAddress');
260        if ($action eq '+') {
261            #  @userMailLocal = &list_union(\@old_MailLocal, \@userMailLocal);
262            @mail = &list_union(\@old_mail, \@mail);
263        } elsif ($action eq '-') {
264            #  @userMailLocal = &list_minus(\@old_MailLocal, \@userMailLocal);
265            @mail = &list_minus(\@old_mail, \@mail);
266        }
267    }
268    #push(@mods, 'mailLocalAddress', [ @userMailLocal ]);
269    push(@mods, 'alias' => [ @mail ]);
270    push(@mods, 'mail' => $mail[0]);
271    #$mailobj = 1;
272}
273
274if ($tmp= $Options{'T'}) {
275  my $action= '';
276  my @old;
277  # action si + or - for adding or deleting an entry
278  if ($tmp =~ s/^([+-])+\s*//) {
279    $action= $1;
280  }
281  my @userMailTo = &split_arg_comma($tmp);
282  if ($action) {
283    @old = $user_entry->get_value('mailRoutingAddress');
284  }
285  if ($action eq '+') {
286    @userMailTo = &list_union(\@old, \@userMailTo);
287  } elsif ($action eq '-') {
288    @userMailTo = &list_minus(\@old, \@userMailTo);
289  }
290  push(@mods, 'mailRoutingAddress', [ @userMailTo ]);
291  $mailobj = 1;
292}
293if ($mailobj) {
294  my @objectclass = $user_entry->get_value('objectClass');
295  if (! grep ($_ =~ /^inetLocalMailRecipient$/i, @objectclass)) {
296    push(@mods, 'objectClass' => [ @objectclass, 'inetLocalMailRecipient' ]);
297  }
298}
299
300
301if (defined($tmp = $Options{'G'})) {
302  my $action= '';
303  if ($tmp =~ s/^([+-])+\s*//) {
304    $action= $1;
305  }
306  if ($action eq '-') {
307    # remove user from specified groups
308    foreach my $gname (&split_arg_comma($tmp)) {
309      group_remove_member($gname, $user);
310    }
311  } else {
312    if ($action ne '+') {
313      my @old = &find_groups_of($user);
314      # remove user from old groups
315      foreach my $gname (@old) {
316        if ($gname ne "") {
317          group_remove_member($gname, $user);
318        }
319      }
320    }
321    # add user to new groups
322    add_grouplist_user($tmp, $user);
323  }
324}
325
326#
327# A : sambaPwdCanChange
328# B : sambaPwdMustChange
329# C : sambaHomePath
330# D : sambaHomeDrive
331# E : sambaLogonScript
332# F : sambaProfilePath
333# H : sambaAcctFlags
334
335my $attr;
336my $winmagic = 2147483647;
337
338$samba = is_samba_user($user);
339
340if (defined($tmp = $Options{'e'})) {
341  if ($samba == 1) {
342    my $kickoffTime=`date --date='$tmp' +%s`;
343    chomp($kickoffTime);
344    push(@mods, 'sambakickoffTime' => $kickoffTime);
345  } else {
346    print "User $user is not a samba user\n";
347  }
348}
349
350my $_sambaPwdCanChange;
351if (defined($tmp = $Options{'A'})) {
352  if ($samba == 1) {
353    $attr = "sambaPwdCanChange";
354    if ($tmp != 0) {
355      $_sambaPwdCanChange=0;
356    } else {
357      $_sambaPwdCanChange=$winmagic;
358    }
359    push(@mods, 'sambaPwdCanChange' => $_sambaPwdCanChange);
360  } else {
361    print "User $user is not a samba user\n";
362  }
363}
364
365my $_sambaPwdMustChange;
366if (defined($tmp = $Options{'B'})) {
367  if ($samba == 1) {
368    if ($tmp != 0) {
369      $_sambaPwdMustChange=0;
370      # To force a user to change his password:
371      # . the attribut sambaPwdLastSet must be != 0
372      # . the attribut sambaAcctFlags must not match the 'X' flag
373      my $_sambaAcctFlags;
374      my $flags = $user_entry->get_value('sambaAcctFlags');
375      if ( defined $flags and $flags =~ /X/ ) {
376        my $letters;
377        if ($flags =~ /(\w+)/) {
378          $letters = $1;
379        }
380        $letters =~ s/X//;
381        $_sambaAcctFlags="\[$letters\]";
382        push(@mods, 'sambaAcctFlags' => $_sambaAcctFlags);
383      }
384      my $_sambaPwdLastSet = $user_entry->get_value('sambaPwdLastSet');
385      if ($_sambaPwdLastSet == 0) {
386        push(@mods, 'sambaPwdLastSet' => $winmagic);
387      }
388    } else {
389      $_sambaPwdMustChange=$winmagic;
390    }
391    push(@mods, 'sambaPwdMustChange' => $_sambaPwdMustChange);
392  } else {
393    print "User $user is not a samba user\n";
394  }
395}
396
397if (defined($tmp = $Options{'C'})) {
398  if ($samba == 1) {
399    if ($tmp eq "" and defined $user_entry->get_value('sambaHomePath')) {
400      push(@dels, 'sambaHomePath' => []);
401    } elsif ($tmp ne "") {
402      push(@mods, 'sambaHomePath' => $tmp);
403    }
404  } else {
405    print "User $user is not a samba user\n";
406  }
407}
408
409my $_sambaHomeDrive;
410if (defined($tmp = $Options{'D'})) {
411  if ($samba == 1) {
412    if ($tmp eq "" and defined $user_entry->get_value('sambaHomeDrive')) {
413      push(@dels, 'sambaHomeDrive' => []);
414    } elsif ($tmp ne "") {
415      $tmp = $tmp.":" unless ($tmp =~ /:/);
416      push(@mods, 'sambaHomeDrive' => $tmp);
417    }
418  } else {
419    print "User $user is not a samba user\n";
420  }
421}
422
423if (defined($tmp = $Options{'E'})) {
424  if ($samba == 1) {
425    if ($tmp eq "" and defined $user_entry->get_value('sambaLogonScript')) {
426      push(@dels, 'sambaLogonScript' => []);
427    } elsif ($tmp ne "") {
428      push(@mods, 'sambaLogonScript' => $tmp);
429    }
430  } else {
431    print "User $user is not a samba user\n";
432  }
433}
434
435if (defined($tmp = $Options{'F'})) {
436  if ($samba == 1) {
437    if ($tmp eq "" and defined $user_entry->get_value('sambaProfilePath')) {
438      push(@dels, 'sambaProfilePath' => []);
439    } elsif ($tmp ne "") {
440      push(@mods, 'sambaProfilePath' => $tmp);
441    }
442  } else {
443    print "User $user is not a samba user\n";
444  }
445}
446
447if ($samba == 1 and (defined $Options{'H'} or defined $Options{'I'} or defined $Options{'J'})) {
448  my $_sambaAcctFlags;
449  if (defined($tmp = $Options{'H'})) {
450    #$tmp =~ s/\\/\\\\/g;
451    $_sambaAcctFlags=$tmp;
452  } else {
453    # I or J
454    my $flags;
455    $flags = $user_entry->get_value('sambaAcctFlags');
456
457    if (defined($tmp = $Options{'I'})) {
458      if ( !($flags =~ /D/) ) {
459        my $letters;
460        if ($flags =~ /(\w+)/) {
461          $letters = $1;
462        }
463        $_sambaAcctFlags="\[D$letters\]";
464      }
465    } elsif (defined($tmp = $Options{'J'})) {
466      if ( $flags =~ /D/ ) {
467        my $letters;
468        if ($flags =~ /(\w+)/) {
469          $letters = $1;
470        }
471        $letters =~ s/D//;
472        $_sambaAcctFlags="\[$letters\]";
473      }
474    }
475  }
476
477
478  if ($_sambaAcctFlags and "$_sambaAcctFlags" ne '') {
479    push(@mods, 'sambaAcctFlags' => $_sambaAcctFlags);
480  }
481
482} elsif (!$samba == 1 and (defined $Options{'H'} or defined $Options{'I'} or defined $Options{'J'})) {
483  print "User $user is not a samba user\n";
484}
485
486# Zarafa stuff
487my $zarafaobj=0;
488if (defined($tmp = $Options{'X'})) {
489  push(@mods, 'zarafaSharedStoreOnly' => 0);
490  $zarafaobj = 1;
491}
492if (defined($tmp = $Options{'x'})) {
493  push(@mods, 'zarafaSharedStoreOnly' => 1);
494  $zarafaobj = 1;
495}
496if (defined($tmp = $Options{'Z'})) {
497  push(@mods, 'zarafaAdmin' => 1);
498  $zarafaobj = 1;
499}
500if (defined($tmp = $Options{'z'})) {
501  push(@mods, 'zarafaAdmin' => 0);
502  $zarafaobj = 1;
503}
504if ($zarafaobj) {
505  my @objectclass = $user_entry->get_value('objectClass');
506  if (! grep ($_ =~ /^zarafa-user$/i, @objectclass)) {
507    push(@mods, 'objectClass' => [ @objectclass, 'zarafa-user' ]);
508  }
509}
510
511
512
513# apply changes
514my $modify = $ldap_master->modify ( "$dn",
515                                    'replace' => { @mods }
516                                  );
517$modify->code && warn "failed to modify entry: ", $modify->error ;
518
519# we can delete only if @dels is not empty: we check the number of elements
520my $nb_to_del=scalar(@dels);
521if ($nb_to_del != 0) {
522  $modify = $ldap_master->modify ( "$dn",
523                                   'delete' => { @dels }
524                                 );
525  $modify->code && warn "failed to modify entry: ", $modify->error ;
526}
527# take down session
528$ldap_master->unbind;
529
530if (defined(my $new_user= $Options{'r'})) {
531  my $ldap_master=connect_ldap_master();
532  chomp($new_user);
533  # read eventual new user entry
534  my $new_user_entry = read_user_entry($new_user);
535  if (defined($new_user_entry)) {
536    print "$0: user $new_user already exists, cannot rename\n";
537    exit (1);
538  }
539  my $modify = $ldap_master->moddn (
540                                    "uid=$user,$config{usersdn}",
541                                    newrdn => "uid=$new_user",
542                                    deleteoldrdn => "1",
543                                    newsuperior => "$config{usersdn}"
544                                   );
545  $modify->code && die "failed to change dn", $modify->error;
546
547  # change cn, sn attributes
548  my $user_entry = read_user_entry($new_user);
549  my $dn= $user_entry->dn();
550  my @mods;
551  push(@mods, 'sn' => $new_user);
552  push(@mods, 'cn' => $new_user);
553  $modify = $ldap_master->modify ("$dn",
554                                  changes => [
555                                              'replace' => [ @mods ]
556                                             ]
557                                 );
558  $modify->code && warn "failed to change cn and sn attributes: ", $modify->error;
559
560  # changing username in groups
561  my @groups = &find_groups_of($user);
562  foreach my $gname (@groups) {
563    if ($gname ne "") {
564      my $dn_line = get_group_dn($gname);
565      my $dn = get_dn_from_line("$dn_line");
566      print "updating group $gname\n";
567      $modify = $ldap_master->modify("$dn",
568                                     changes => [
569                                                 'delete' => [memberUid => $user],
570                                                 'add' => [memberUid => $new_user]
571                                                ]);
572      $modify->code && warn "failed to change cn and sn attributes: ", $modify->error;
573    }
574  }
575  $ldap_master->unbind;
576}
577
578$nscd_status = system "/etc/init.d/nscd status >/dev/null 2>&1";
579
580if ($nscd_status == 0) {
581  system "/etc/init.d/nscd restart > /dev/null 2>&1";
582}
583system "nscd -i passwd; nscd -i group";
584
585if (defined($Options{'P'})) {
586  exec "$RealBin/smbldap-passwd $user"
587}
588
589
590############################################################
591
592=head1 NAME
593
594smbldap-usermod - Modify a user account
595
596=head1 SYNOPSIS
597
598smbldap-usermod [-a] [-c comment] [-d home_dir] [-e expiration_date] [-g initial_group] [-l login_name] [-p passwd] [-s shell] [-u uid [ -o]] [-x] [-A canchange] [-B mustchange] [-C smbhome] [-D homedrive] [-E scriptpath] [-F profilepath] [-G group[,...]] [-H acctflags] [-N canonical_name] [-S surname] [-P] login
599
600=head1 DESCRIPTION
601
602The  smbldap-usermod  command  modifies the system account files to reflect the changes that are specified on the  command  line. The  options  which apply to the usermod command are
603
604-a
605 Add the sambaSAMAccount objectclass to the specified user account. This allow the user to become a samba user.
606
607-c comment
608 The new value of the user's comment field (gecos).
609
610-d home_dir
611 The user's new login directory.
612
613-e expiration_date
614 Set the expiration date for the user account. This only affect samba account. The date must be in the following format : YYYY-MM-DD HH:MM:SS. This option call the external 'date' command to set calculate the number of seconds from Junary 1 1970 to the specified date.
615
616-g initial_group
617 The group name or number of the user's new initial login  group. The  group  name  must  exist.   A group number must refer to an already existing group.  The default group number is 1.
618
619-G group,[...]
620 A list of supplementary groups which the user is also  a  member of.   Each  group is separated from the next by a comma, with no intervening whitespace.  The groups  are  subject  to  the  same restrictions as the group given with the -g option.  If the user is currently a member of a group which is not listed,  the  user will be removed from the group
621
622-l login_name
623 The  name  of the user will be changed from login to login_name. Nothing else is changed.  In particular, the user's home  directory name  should  probably be changed to reflect the new login name.
624
625-s shell
626 The name of the user's new login shell.  Setting this  field  to blank causes the system to select the default login shell.
627
628-u uid
629 The  numerical  value  of  the  user's  ID.   This value must be unique, unless the -o option is used.  The value  must  be  non negative.  Any files which the user owns  and  which  are located  in  the directory tree rooted at the user's home directory will have the file user ID  changed  automatically.   Files outside of the user's home directory must be altered manually.
630
631-r new_user
632 Allow to rename a user. This option will update the cn, sn and dn attribute for the user. You can
633 also update others attributes using the corresponding script options.
634
635-x
636 Creates rid and primaryGroupID in hex instead of decimal (for Samba 2.2.2 unpatched only - higher versions always use decimal)
637
638-A
639 can change password ? 0 if no, 1 if yes
640
641-B
642 must change password ? 0 if no, 1 if yes
643
644-C
645 sambaHomePath (SMB home share, like '\\\\PDC-SRV\\homes')
646
647-D
648 sambaHomeDrive (letter associated with home share, like 'H:')
649
650-E
651 sambaLogonScript, relative to the [netlogon] share (DOS script to execute on login, like 'foo.bat')
652
653-F
654 sambaProfilePath (profile directory, like '\\\\PDC-SRV\\profiles\\foo')
655
656-H
657 sambaAcctFlags, spaces and trailing bracket are ignored (samba account control bits like '[NDHTUMWSLKI]')
658
659-I
660 disable user. Can't be used with -H or -J
661
662-J
663 enable user. Can't be used with -H or -I
664
665-N
666 set the canonical name (attribut cn)
667
668-S
669 Set the surname
670
671-P
672 End by invoking smbldap-passwd to change the user password (both unix and samba passwords)
673
674=head1 SEE ALSO
675
676       usermod(1)
677
678=cut
679
680#'
Note: See TracBrowser for help on using the repository browser.