/[smecontribs]/rpms/smeserver-lazy_admin_tools/contribs8/smeserver-lazy_admin_tools-1.0-patch3.patch
ViewVC logotype

Contents of /rpms/smeserver-lazy_admin_tools/contribs8/smeserver-lazy_admin_tools-1.0-patch3.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Wed Jun 19 04:30:57 2013 UTC (11 years, 2 months ago) by unnilennium
Branch: MAIN
CVS Tags: smeserver-lazy_admin_tools-1_0-6_el5_sme, smeserver-lazy_admin_tools-1_0-5_el5_sme, smeserver-lazy_admin_tools-1_0-8_el5_sme, smeserver-lazy_admin_tools-1_1-1_el5_sme, smeserver-lazy_admin_tools-1_0-9_el5_sme, smeserver-lazy_admin_tools-1_0-7_el5_sme
* Mon May 13 2013 JP PIALASSE tests@pialasse.com  1.0-5.sme
- fixed lat-procmail [SME: 7139]
- fixed removing user with home dir not in /home/e-smith/files/users/ [SME: 7162]
- create basic SME pseudonyms using option -n for nicknames [SME: 7284]
- patch3
* Sat Feb 02 2013 JP PIALASSE tests@pialasse.com  1.0-4.sme
- fixed empty  Gid property  creation on user update bug [SME: 7192]
- added lat-shadow binary [SME: 7137]
- patch1 and patch2
* Sat Feb 02 2013 JP PIALASSE tests@pialasse.com  1.0-3.sme
- fixed warning on empty group creation/update bug [SME: 7202]
- fixed uid changed on user update bug [SME: 7196]
- fixed warning on user creation/update bug [SME: 7192]
- patch0
* Sat Feb 02 2013 JP PIALASSE tests@pialasse.com  1.0-2.sme
- binary are not executable [SME: 7138]
* Sat May 26 2012 JP PIALASSE tests@pialasse.com  1.0-1.sme
- Initial version

1 diff -up smeserver-lazy_admin_tools-1.0/root/usr/sbin/lat-procmail.patch3 smeserver-lazy_admin_tools-1.0/root/usr/sbin/lat-procmail
2 --- smeserver-lazy_admin_tools-1.0/root/usr/sbin/lat-procmail.patch3 2006-02-09 23:19:25.000000000 -0500
3 +++ smeserver-lazy_admin_tools-1.0/root/usr/sbin/lat-procmail 2013-05-13 22:08:28.000000000 -0400
4 @@ -31,8 +31,8 @@ if ( $Hlp ) { &PrintPod(9); exit; }
5 # Check for e-smith-user-panel
6 my $UPanel=`rpm -qa | grep -c "smeserver-userpanel"`;
7 if ( $UPanel < 1 ) {
8 - print "\nThis tool requires the smeserver-userpanel contribution from Dungog Networks.\n";
9 - print "Please download it from http://dungog.net and install it first.\n\n\a";
10 + print "\nThis tool requires the smeserver-userpanel and smeserver-mailsorting contribution.\n";
11 + print "Please download them with yum from smecontribs repo and configure them first.\n\n\a";
12 exit;
13 }
14
15 @@ -73,7 +73,7 @@ foreach my $record (@records)
16 print "Activating procmail for user '$username'.\n";
17 db_set(\%processmail, $username, 'settings', \%user);
18 db_set_prop(\%accounts, $username, 'EmailForward', 'procmail');
19 - system("/sbin/e-smith/signal-event", "user-modprocmail", $username) == 0
20 + system("/sbin/e-smith/signal-event", "email-update-quick", $username) == 0
21 or die ("An error occurred while updating account '$username'.\n");
22 }
23 }
24 @@ -81,7 +81,7 @@ foreach my $record (@records)
25 print "Deactivating procmail for user '$username'.\n";
26 db_delete(\%processmail, $username, 'settings', \%user);
27 db_set_prop(\%accounts, $username, 'EmailForward', 'local');
28 - system("/sbin/e-smith/signal-event", "user-modprocmail", $username) == 0
29 + system("/sbin/e-smith/signal-event", "email-update-quick", $username) == 0
30 or die ("An error occurred while updating account '$username'.\n");
31 }
32 }
33 diff -up smeserver-lazy_admin_tools-1.0/root/usr/sbin/lat-users.patch3 smeserver-lazy_admin_tools-1.0/root/usr/sbin/lat-users
34 --- smeserver-lazy_admin_tools-1.0/root/usr/sbin/lat-users.patch3 2013-05-13 22:05:14.000000000 -0400
35 +++ smeserver-lazy_admin_tools-1.0/root/usr/sbin/lat-users 2013-06-19 00:28:33.000000000 -0400
36 @@ -18,6 +18,7 @@ tie %accounts, 'esmith::config', '/home/
37 my ($Hlp, $Cml, $Frc, $Inp, $Pwf);
38 my $Add =0;
39 my $Del =0;
40 +my $Kaa =0;
41 my $passwlist="./passwords.new";
42
43 #==============================================================================
44 @@ -28,7 +29,8 @@ GetOptions ("help" => \$Hlp,
45 "add" => \$Add,
46 "delete" => \$Del,
47 "force" => \$Frc,
48 - "passwords" => \$Pwf,
49 + "nickname" => \$Kaa,
50 + "passwords" => \$Pwf,
51 "command-line=s" => \$Cml,
52 "input-file=s" => \$Inp);
53
54 @@ -116,6 +118,12 @@ if ($Add) {
55 system("/usr/sbin/lat-groups -a -c='$fields[$cntgrps]|$fields[$cntgrps]||$username'");
56 }
57 }
58 + if ($Kaa) {
59 +
60 + print "creating SME default pseudonyms\a\n";
61 + system("/usr/sbin/lat-pseudonyms -a -c='$username|".$user{"FirstName"}.".".$user{"LastName"}."|".$user{"FirstName"}."_".$user{"LastName"}."'");
62 +
63 + }
64 }
65 }
66 else { print "User '$username' is not a correct username.\a\n"; }
67 @@ -136,18 +144,24 @@ if ($Del) {
68
69 if ((db_get(\%accounts, $username)) && (db_get_type(\%accounts, $username) eq "user")) {
70 my $yn = 'yes';
71 - if (! $Frc) {
72 - print "Do you want to delete user '$username'?\n";
73 - print "All files belonging to this user account will be deleted! [yes/NO/all] ";
74 - $yn = <STDIN>;
75 - if ($yn =~ /^a/i) { $Frc = -1; $yn="yes"; }
76 - }
77 - if ($yn =~ /^y/i) {
78 - print "Deleting user account '$username'.\n";
79 - db_delete(\%accounts, $username);
80 - system("/sbin/e-smith/signal-event", "user-delete", $username);
81 - system("/usr/sbin/lat-groups -r -f -c='*|$username'");
82 - }
83 + my $userdir = `cat /etc/passwd|grep "^$username:"|cut -d":" -f6`;
84 + print "$userdir\n";
85 + if ( $userdir eq "/home/e-smith/files/users/$username" )
86 + {
87 + if (! $Frc) {
88 + print "Do you want to delete user '$username'?\n";
89 + print "All files belonging to this user account will be deleted! [yes/NO/all] ";
90 + $yn = <STDIN>;
91 + if ($yn =~ /^a/i) { $Frc = -1; $yn="yes"; }
92 + }
93 + if ($yn =~ /^y/i) {
94 + print "Deleting user account '$username'.\n";
95 + db_delete(\%accounts, $username);
96 + system("/sbin/e-smith/signal-event", "user-delete", $username);
97 + system("/usr/sbin/lat-groups -r -f -c='*|$username'");
98 + }
99 + }
100 + else { print "'$username' is not a regular SME user with its home in /home/e-smith/files/users/, can not remove it\n\a";}
101 }
102 else { print "Can't find user '$username'.\n\a";}
103 }

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed