On Fri, Feb 19, 2010 at 2:31 AM, vishwanath govind
<[email protected]> wrote:
> Garret,
>  Thanks for your help and appreciated, using strace found that it missing
> libnss* files. So i copied them to target lib and it started working. I
> believe these libnss* files direct it to look for /etc/passwd file for the
> given user name records.
> Regards
> Vishwa
>
> On Thu, Feb 18, 2010 at 5:33 PM, Garrett Cooper <[email protected]> wrote:
>>
>> On Thu, Feb 18, 2010 at 3:55 AM, vishwanath govind
>> <[email protected]> wrote:
>> > Garret,
>> >>>Do you have an alternative means of checking, like with perl,
>> > python, etc?
>> >
>> > Finally I cross-compiled Python and  got it workin on my target device.
>> > is
>> > it possible to use python and parse /etc/passwd file for getpwnam()
>> > funtion.
>> > I believe if it returns uid and gid of the given user is more than
>> > enough
>> > correct?
>>
>> python -c 'import pwd; print pwd.getpwnam("nobody")'
>>
>> should produce a tuple, like:
>>
>> gcoo...@orangebox ~ $ python -c 'import pwd; print pwd.getpwnam("nobody")'
>> pwd.struct_passwd(pw_name='nobody', pw_passwd='x', pw_uid=65534,
>> pw_gid=65534, pw_gecos='nobody', pw_dir='/', pw_shell='/bin/false')
>>
>> >>>Do you need to update your shadow password db setup?
>> >  I dont have shadow password db setup in filesystem but ported openLDAP
>> > to
>> > my target device, is this help me ? The target device doen't have
>> > ethernet
>> > controller support so i cann't communicate to host. Curently passwd and
>> > group files in /etc directory as i mentioned above.
>>
>> Err... that wasn't required :\. I was just wondering if you originally
>> set it up, but it was broken because it couldn't talk to the ldap
>> server or something... oh well...if it's trying to lookup the username
>> in ldap and failing, that would be interesting as well.
>>
>> One avenue we haven't tried yet is ltrace/strace though. That would
>> tie down the actual root cause a bit better.
>>
>> > Please let me know your thoughts.
>>
>> Thanks!
>> -Garrett
>>
>> > On Tue, Feb 16, 2010 at 1:00 PM, Garrett Cooper <[email protected]>
>> > wrote:
>> >>
>> >> On Mon, Feb 15, 2010 at 11:25 PM, vishwanath govind
>> >> <[email protected]> wrote:
>> >> > I have initramfs file system built using Busybox-1.16.0 and didn't
>> >> > setup
>> >> > the
>> >> > ldap/nis. I have few files in /etc like passwd,group and syslogd conf
>> >> > files.But getpwnam() should search local repository(/etc/passwd file)
>> >> > and
>> >> > returns a pointer to a struct passwd, correct?. Do i really need to
>> >> > setup
>> >> > ldap/NIS to make it work getpwnam() funtion? The device i am using
>> >> > has
>> >> > memory restriction to add more stuff to filesystem and its very
>> >> > minimal.
>> >> > So
>> >> > please guide me what are the minimal things need to setup to get
>> >> > getpwnam()
>> >> > function working? Please correct me if i am wrong here.
>> >> >
>> >> > Regards
>> >> > Vishwa
>> >> >
>> >> > On Mon, Feb 15, 2010 at 1:48 PM, Garrett Cooper <[email protected]>
>> >> > wrote:
>> >> >>
>> >> >> On Sun, Feb 14, 2010 at 11:59 PM, vishwanath govind
>> >> >> <[email protected]> wrote:
>> >> >> > Yes, I checked this before, It return errorno "0". Somehow mknod02
>> >> >> > won't
>> >> >> > display the errorno when it exit with "tst_brkm(TBROK, cleanup,
>> >> >> > "%s
>> >> >> > not
>> >> >> > in
>> >> >> > /etc/passwd", LTPUSER)" but I have similar tests return errorno 0.
>> >> >> > I
>> >> >> > see
>> >> >> > "nobody" user and uid/gid -99 is present in /etc/passwd file. Do I
>> >> >> > need
>> >> >> > to
>> >> >> > enable anything in KERNEL config or /etc?
>> >> >> >
>> >> >> > ============================log===============================
>> >> >> > <<<test_start>>>
>> >> >> > tag=nftw01 stime=1170483127
>> >> >> > cmdline="nftw01"
>> >> >> > contacts=""
>> >> >> > analysis=exit
>> >> >> > <<<test_output>>>
>> >> >> > nobody not found in /etc/passwd: No such file or directory
>> >> >> > <<<execution_status>>>
>> >> >> > initiation_status="ok"
>> >> >> > duration=0 termination_type=exited termination_id=1 corefile=no
>> >> >> > cutime=1 cstime=2
>> >> >> > <<<test_end>>>
>> >> >> > <<<test_start>>>
>> >> >> > tag=nftw6401 stime=1170483127
>> >> >> > cmdline="nftw6401"
>> >> >> > contacts=""
>> >> >> > analysis=exit
>> >> >> > <<<test_output>>>
>> >> >> > change_owner: nobody not found in /etc/passwd: No such file or
>> >> >> > directory
>> >> >> > <<<execution_status>>>
>> >> >> > initiation_status="ok"
>> >> >> > duration=0 termination_type=exited termination_id=1 corefile=no
>> >> >> > cutime=2 cstime=1
>> >> >> > <<<test_end>>>
>> >> >> >
>> >> >> > ==============================end==================================
>> >> >> > Regards
>> >> >> > Vishwa
>> >> >> >
>> >> >> > On Mon, Feb 15, 2010 at 12:50 PM, Garrett Cooper
>> >> >> > <[email protected]>
>> >> >> > wrote:
>> >> >> >>
>> >> >> >> On Sun, Feb 14, 2010 at 11:09 PM, vishwanath govind
>> >> >> >> <[email protected]> wrote:
>> >> >> >> > Garrett,
>> >> >> >> >  Thanks for your quick reply. I am using "ltp-full-20091231".
>> >> >> >> > Regards
>> >> >> >> > Vishwa
>> >> >> >> >
>> >> >> >> > On Mon, Feb 15, 2010 at 12:33 PM, Garrett Cooper
>> >> >> >> > <[email protected]>
>> >> >> >> > wrote:
>> >> >> >> >>
>> >> >> >> >> On Sun, Feb 14, 2010 at 10:51 PM, vishwanath govind
>> >> >> >> >> <[email protected]> wrote:
>> >> >> >> >> >
>> >> >> >> >> > Hi,
>> >> >> >> >> > I am facing common issue which causing many of the LTP
>> >> >> >> >> > syscalls
>> >> >> >> >> > test
>> >> >> >> >> > cases
>> >> >> >> >> > to fail. I have taken mknod02 test to show this issue here.
>> >> >> >> >> > Definitely I
>> >> >> >> >> > am
>> >> >> >> >> > missing something out here, could you guys please point me
>> >> >> >> >> > to
>> >> >> >> >> > right
>> >> >> >> >> > direction?  Please let me know if you need some more
>> >> >> >> >> > info/log
>> >> >> >> >> >
>> >> >> >> >> > ======================log================================
>> >> >> >> >> > # ls /etc
>> >> >> >> >> > group   passwd
>> >> >> >> >> >
>> >> >> >> >> > # ./IDcheck.sh
>> >> >> >> >> > Checking for required user/group ids
>> >> >> >> >> > 'nobody' user id and group found.
>> >> >> >> >> > 'bin' user id and group found.
>> >> >> >> >> > 'daemon' user id and group found.
>> >> >> >> >> > Users group found.
>> >> >> >> >> > Sys group found.
>> >> >> >> >> > Required users/groups exist.
>> >> >> >> >> >
>> >> >> >> >> > # cat /etc/passwd
>> >> >> >> >> > root:x:0:0:root::
>> >> >> >> >> > nobody:x:99:99:nobody::
>> >> >> >> >> > bin:x:1:1:bin::
>> >> >> >> >> > daemon:x:2:2:daemon::
>> >> >> >> >> >
>> >> >> >> >> > #uname -a
>> >> >> >> >> > Linux (none) 2.6.29 #4 PREEMPT Thu Feb 11 23:37:46 PST 2010
>> >> >> >> >> > armv6l
>> >> >> >> >> > GNU/Linux
>> >> >> >> >> >
>> >> >> >> >> > # ./mknod02
>> >> >> >> >> > mknod02     1  TBROK  :  nobody not in /etc/passwd
>> >> >> >> >>
>> >> >> >> >> What version of LTP is this?
>> >> >> >>
>> >> >> >> That's a lousy diagnostic, as any one of the following errors
>> >> >> >> could
>> >> >> >> be
>> >> >> >> the culprit:
>> >> >> >>
>> >> >> >> ERRORS
>> >> >> >>       0 or ENOENT or ESRCH or EBADF or EPERM or ...
>> >> >> >>              The given name or uid was not found.
>> >> >> >>
>> >> >> >>       EINTR  A signal was caught.
>> >> >> >>
>> >> >> >>       EIO    I/O error.
>> >> >> >>
>> >> >> >>       EMFILE The maximum number (OPEN_MAX) of files was open
>> >> >> >> already
>> >> >> >> in the calling process.
>> >> >> >>
>> >> >> >>       ENFILE The maximum number of files was open already in the
>> >> >> >> system.
>> >> >> >>
>> >> >> >>       ENOMEM Insufficient memory to allocate passwd structure.
>> >> >> >>
>> >> >> >>       ERANGE Insufficient buffer space supplied.
>> >> >> >>
>> >> >> >> What are the permissions on the file and is there any way where
>> >> >> >> you
>> >> >> >> could grab the latest copy of the file from git and try that out
>> >> >> >> (the
>> >> >> >> patch is available at:
>> >> >>
>> >> >> Nope... you sure your ldap / nis isn't busted?
>> >>
>> >>    No.. heh. I was just wondering if you had it partially setup but
>> >> it was broken somehow.
>> >>    Do you have an alternative means of checking, like with perl,
>> >> python, etc? Do you need to update your shadow password db setup?

Good to hear!
All the best,
-Garrett

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to