[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: logging with pam to busybox
From: Denys Vlasenko <vda.linux () googlemail ! com>
Date: 2019-02-09 19:59:48
Message-ID: CAK1hOcNOr3zXKsQ_xXSpBPGou_kXcj+ovmZdbja5u7-5f5Lodw () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/related)]
[Attachment #4 (multipart/alternative)]
On Sun, Jan 20, 2019 at 6:48 PM אלכסיי סיליוק <alex.silyuk@gmail.com>
wrote:
>
> Hello, i am using busybox to run on my embedded device.
> i am using tacacs server to authenticate to device instead of using local
> database and i faced some problem.
> i am removing username "su" from /etc/passwd .after that i am entering in
> login prompt username "su" and password, pam mofule trying to authenticate
> to tacacs server and returning FAIL, and it's ok.
> After that i am using correct username and password for existing user at
> tacacs server, after entering, i see in tacacs server that user
> authenticated successfully but login prompt simply staing in clean screen,
> as shown at attached image
>
>
> [image: Screenshot_3.png]
>
Well, it's not clear why this happens. This needs to be run under strace.
after this, i am clicking CTRL+C and enter, trying again with same username
> and password and login succeed
>
> [image: Screenshot_4.png]
>
> today, after enabling in config file option
>
> CONFIG_LOGIN_SESSION_AS_CHILD=y
>
> and reloading device, it seems that problem described above, solved, but
> now all logs of SYSLOG goes to screen instead of /var/log/message , as you
> can see in next screenshot
>
> [image: Screenshot_5.png]
>
Where log goes should in no way depend on what login does:
"syslog" is simply what gets sent to /dev/log socket.
Our crond uses this:
openlog(applet_name, LOG_CONS | LOG_PID, LOG_CRON);
LOG_CONS: "Write directly to the system console if there is an error while
sending to the system logger."
Evidently, it has difficulty connecting to /dev/log, and thus prints to
console.
[Attachment #7 (text/html)]
<div dir="ltr"><div dir="ltr"><div dir="ltr"><br><div class="gmail_quote"><div \
dir="ltr" class="gmail_attr">On Sun, Jan 20, 2019 at 6:48 PM אלכסיי \
סיליוק <<a \
href="mailto:alex.silyuk@gmail.com">alex.silyuk@gmail.com</a>> \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div \
dir="ltr"><br><div class="gmail_quote"><div dir="ltr"><div dir="ltr"><div \
dir="ltr"><div>Hello, i am using busybox to run on my embedded \
device.<br></div><div>i am using tacacs server to authenticate to device instead of \
using local database and i faced some problem.</div><div>i am removing username \
"su" from /etc/passwd .after that i am entering in login prompt username \
"su" and password, pam mofule trying to authenticate to tacacs server and \
returning FAIL, and it's ok.</div><div>After that i am using correct username and \
password for existing user at tacacs server, after entering, i see in tacacs server \
that user authenticated successfully but login prompt simply staing in clean screen, \
as shown at attached image \
</div><div><div><br></div></div><div><br></div><div><div><img src="cid:ii_jr56m3t92" \
alt="Screenshot_3.png" width="359" \
height="165"><br></div></div></div></div></div></div></div></blockquote><div><br></div><div>Well, \
it's not clear why this happens. This needs to be run under \
strace.</div><div><br></div><div><br></div><blockquote class="gmail_quote" \
style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div \
dir="ltr"><div dir="ltr"><div dir="ltr"><div></div><div>after this, i am clicking \
CTRL+C and enter, trying again with same username and password and login \
succeed</div><div><br></div><div><div><img src="cid:ii_jr56ovim3" \
alt="Screenshot_4.png" width="196" \
height="158"><br></div></div><div><br></div><div>today, after enabling in config file \
option</div><div><br></div><div><div>CONFIG_LOGIN_SESSION_AS_CHILD=y</div></div><div><br></div><div>and \
reloading device, it seems that problem described above, solved, but now all logs of \
SYSLOG goes to screen instead of /var/log/message , as you can see in next \
screenshot</div><div><br></div><div><div><img src="cid:ii_jr56utyt5" \
alt="Screenshot_5.png" width="542" \
height="243"><br></div></div></div></div></div></div></div></blockquote><div><br></div><div>Where \
log goes should in no way depend on what login does:</div><div>"syslog" is \
simply what gets sent to /dev/log socket.</div><div><br></div><div>Our crond uses \
this:<br></div><br><div>openlog(applet_name, LOG_CONS | LOG_PID, \
LOG_CRON);</div><div><br></div><div>LOG_CONS: "Write directly to the system \
console if there is an error while sending to the system \
logger."</div><div><br></div><div>Evidently, it has difficulty connecting to \
/dev/log, and thus prints to console.<br></div></div></div></div></div>
["Screenshot_3.png" (image/png)]
["Screenshot_4.png" (image/png)]
["Screenshot_5.png" (image/png)]
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic