关闭

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

244人阅读 评论(0) 收藏 举报
分类:

针对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
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:55166次
    • 积分:818
    • 等级:
    • 排名:千里之外
    • 原创:16篇
    • 转载:39篇
    • 译文:6篇
    • 评论:6条
    文章分类
    最新评论