删除libnss*库后,busybox login遭遇login incorrect

针对glibc删除了所有的libnss库,开机时在输入密码root后,出现login incorrect错误选项,而uclibc没有此问题。具体原因:


GNU Libc (glibc) uses the Name Service Switch (NSS) to configure the behaviorof the C library for the local environment, and to configure how it readssystem data, such as passwords and group information. This is implementedusing an /etc/nsswitch.conf configuration file, and using one or more of the/lib/libnss_* libraries. BusyBox tries to avoid using any libc calls that makeuse of NSS. Some applets however, such as login and su, will use libc functionsthat require NSS.

If you enable CONFIG_USE_BB_PWD_GRP, BusyBox will use internal functions todirectly access the /etc/passwd, /etc/group, and /etc/shadow files withoutusing NSS. This may allow you to run your system without the need forinstalling any of the NSS configuration files and libraries.

When used with glibc, the BusyBox 'networking' applets will similarly requirethat you install at least some of the glibc NSS stuff (in particular,/etc/nsswitch.conf, /lib/libnss_dns*, /lib/libnss_files*, and /lib/libresolv*).

Shameless Plug: As an alternative, one could use a C library such as uClibc. Inaddition to making your system significantly smaller, uClibc does not require theuse of any NSS support files or libraries.



参考

https://busybox.net/downloads/BusyBox.html  里面的LIBC NSS

http://lists.busybox.net/pipermail/busybox/2013-October/079877.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值