calvinlyp has asked for the wisdom of the Perl Monks concerning the following question:

hi all, i am relatively new to perl.

i am doing a project that requires to grab data from gps receiver.

the software i am using is schedg.

i am running ubuntu 8.10.

the name of the file generating error is schedg_client.pl

i tried to run the standalone version after configuring:

SCHEDGCONFIG=~/Schedg/xml/Schedg.xml ./schedg_client.pl --configfile ~/Schedg/client/direct-ttyS0 --user USER

but i got an error stated below:
Cannot get uid for user at ./schedg_client.pl line 91, <HI> line 14.

any help from anyone?
thanks!!

a copy of the script:
can be downloaded from http://sourceforge.net/projects/schedg

the perl file is in the folder schedg-2.0.b4/schedg-2.0.b4/bin

while the readme.txt is in the folder schedg-2.0.b4/schedg-2.0.b4/setup/docs

Replies are listed 'Best First'.
Re: schedg software
by targetsmart (Curate) on May 20, 2009 at 06:54 UTC
    did you saw a preview of your post before creating it?.
    see Markup in the Monastery

    the line around 91 is like this

    89:my $uid = getpwnam($user); 90:my $gid = getgrnam($user); 91:die "Cannot get uid for $user" unless ($uid); 92:die "Cannot get gid for $user" unless ($gid);
    IMO the user name you pass as argument has no relevant user id in the system.

    Vivek
    -- In accordance with the prarabdha of each, the One whose function it is to ordain makes each to act. What will not happen will never happen, whatever effort one may put forth. And what will happen will not fail to happen, however much one may seek to prevent it. This is certain. The part of wisdom therefore is to stay quiet.

      ya i did preview but i do not have any idea how to edit them.

      thanks for the link, now i have some idea to make my words look more neat. sorry about the format

      pertaining to my post, i just run as normal of what is the stated to run as a standalone i have no idea what is the user id?

      is it suppose to be my local host user id? if yes, i did tried but is the same result?

        AFAIK, In case if you are using *nix system, check with the command 'id <username>', if it gives some user id then your program also should work, otherwise check whether such user entry exist in /etc/passwd file, if not you may be using LDAP authentication.

        Vivek
        -- In accordance with the prarabdha of each, the One whose function it is to ordain makes each to act. What will not happen will never happen, whatever effort one may put forth. And what will happen will not fail to happen, however much one may seek to prevent it. This is certain. The part of wisdom therefore is to stay quiet.