logging with pam to busybox

Denys Vlasenko vda.linux at googlemail.com
Sat Feb 9 19:59:48 UTC 2019


‪On Sun, Jan 20, 2019 at 6:48 PM ‫אלכסיי סיליוק‬‎ <alex.silyuk at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20190209/23b60fc1/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot_3.png
Type: image/png
Size: 3538 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20190209/23b60fc1/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot_4.png
Type: image/png
Size: 3710 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20190209/23b60fc1/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot_5.png
Type: image/png
Size: 18240 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20190209/23b60fc1/attachment-0005.png>


More information about the busybox mailing list