Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Perl in Redhat5.2
@ 1999-01-09 18:37 Dumb Kid
  0 siblings, 0 replies; only message in thread
From: Dumb Kid @ 1999-01-09 18:37 UTC (permalink / raw)
  To: axp-list

Hi all,

I don't know if it's just me or it's a bug in perl package
that ship with redhat5.2.

I have RedHat5.2 for both Intel and Alpha, and I have no way
to get the "gcos" or "realname" of a user in the password file.

  #!/usr/bin/perl

  my(@pwent)=getpwnam("root");

  print "@pwent\n";


And I can find the realname stored anywhere in @pwent. However,
if I do the following in C:

   #include <stdio.h>
   #include <pwd.h>
   #include <sys/types.h>

   main(){
     struct passwd *pwent;
     pwent = getpwnam("root");

     printf("(%s)\n", pwent->gecos);
   }

It will show me the "realname", what happened?? Anyone has the
same problem??

Regards,
Tom

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-01-09 18:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-01-09 18:37 Perl in Redhat5.2 Dumb Kid

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox