ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Installation/Configuration Support » MQM users

Post new topic  Reply to topic
 MQM users « View previous topic :: View next topic » 
Author Message
ranjan1247
PostPosted: Tue Jan 27, 2015 5:30 pm    Post subject: MQM users Reply with quote

Novice

Joined: 17 Feb 2014
Posts: 20

How to extract mqm users from a server?
Back to top
View user's profile Send private message
bruce2359
PostPosted: Tue Jan 27, 2015 7:13 pm    Post subject: Re: MQM users Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9405
Location: US: west coast, almost. Otherwise, enroute.

ranjan1247 wrote:
How to extract mqm users from a server?

I'd suggest some kind of bait to attract them, like pizza or beer. Once they leave the confines of the server, lure them away from the server room.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
tczielke
PostPosted: Wed Jan 28, 2015 4:27 am    Post subject: Re: MQM users Reply with quote

Guardian

Joined: 08 Jul 2010
Posts: 939
Location: Illinois, USA

ranjan1247 wrote:
How to extract mqm users from a server?


Are you asking you to find all the users that are members in the mqm group on a UNIX server?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Jan 28, 2015 5:18 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20697
Location: LI,NY

How about using the OS facilities to query group membership?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
tczielke
PostPosted: Wed Jan 28, 2015 6:12 am    Post subject: Reply with quote

Guardian

Joined: 08 Jul 2010
Posts: 939
Location: Illinois, USA

fjb_saper wrote:
How about using the OS facilities to query group membership?


If "using the OS facilities to query group membership" means to do that programmatically, then I would agree. I personally have not found a way to do that through just using UNIX commands, if some of the user information is only stored in LDAP (and not locally in the /etc/passwd and /etc/group files).

This is the C program that I use to find all the members in a group. It seems to work well for Linux and Solaris.

Code:

#include <sys/types.h>
#include <grp.h>
#include <pwd.h>
#include <string.h>

int main(int argc, char *argv[])
{

  int          i;
  struct group *gr;
  struct passwd *pw;

/* 1 argument is required for trace input file */
  if (argc != 2)
    {
     printf("grpusers requires 1 argument for group name\n");
     exit(-1);
    }   

  if (!(gr = getgrnam(argv[1])))
    {
     endgrent(  );
     printf("group name %s was not found in database\n", argv[1]);
     exit(-1);
    }
   
  printf("group member names for %s\n", argv[1]);

  for (i = 0;  gr->gr_mem[i];  i++)
    puts(gr->gr_mem[i]);

  endgrent(  );

  printf("users with primary group of %s\n", argv[1]);

  pw = getpwent();

  for (; pw; pw = getpwent()) {
    if ( pw->pw_gid == gr->gr_gid )
      puts(pw->pw_name);
  }

  endpwent();

  exit(0);
}
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Wed Jan 28, 2015 10:01 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3253
Location: London, ON Canada

Maybe this is too simple but I prefer:
Code:
cat /etc/group | grep <group_name>

Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Wed Jan 28, 2015 10:40 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

I'd still recommend pizza or beer.....
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Jan 28, 2015 10:49 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Vitor wrote:
I'd still recommend pizza or beer.....


"Free Donuts at the Great Egress".
Back to top
View user's profile Send private message
tczielke
PostPosted: Wed Jan 28, 2015 10:57 am    Post subject: Reply with quote

Guardian

Joined: 08 Jul 2010
Posts: 939
Location: Illinois, USA

RogerLacroix wrote:
Maybe this is too simple but I prefer:
Code:
cat /etc/group | grep <group_name>

Regards,
Roger Lacroix
Capitalware Inc.


That would miss users in mqm, if they are stored remotely in the LDAP server. At least, that has been my experience.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jan 28, 2015 11:20 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqjeff wrote:
Vitor wrote:
I'd still recommend pizza or beer.....


"Free Donuts at the Great Egress".


One born every minute.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Wed Jan 28, 2015 1:07 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9405
Location: US: west coast, almost. Otherwise, enroute.

It's not just me, then.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Installation/Configuration Support » MQM users
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.