• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/samba-3.0.13/examples/LDAP/smbldap-tools-0.8.7/
1#!/usr/bin/perl -w
2
3# $Id: smbldap-groupshow,v 1.7 2004/11/06 17:54:26 jtournier Exp $
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-groupshow : user (posix,shadow,samba) display
26#
27# History :
28#       . originally by David Le Corfec <david.le-corfec@IDEALX.com>
29
30use strict;
31use FindBin;
32use FindBin qw($RealBin);
33use lib "$RealBin/";
34use smbldap_tools;
35use Getopt::Std;
36my %Options;
37
38my $ok = getopts('?', \%Options);
39
40if ( (!$ok) || (@ARGV < 1) || ($Options{'?'}) ) {
41  print_banner;
42  print "Usage: $0 [-?] group\n";
43  print "  -?	show this help message\n";
44  exit (1);
45}
46
47# Read only first @ARGV
48my $group = $ARGV[0];
49
50my $ldap_slave=connect_ldap_slave();
51
52my $lines = read_group($group);
53if (!defined($lines)) {
54  print "$0: group $group doesn't exist\n";
55  exit (1);
56}
57
58print "$lines\n";
59
60# take down session
61$ldap_slave->unbind;
62
63exit(0);
64
65############################################################
66
67=head1 NAME
68
69smbldap-groupshow - Display group informations
70
71=head1 SYNOPSIS
72
73smbldap-groupshow groupname
74
75=head1 DESCRIPTION
76
77The smbldap-groupshow command displays informations associated with the given group.
78
79=cut
80
81#'
82