LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 3465|回复: 3

anonymous登录只可以看到U(G)ID Number,看不到 U(G)ID Name,为什么?

[复制链接]
发表于 2003-9-18 11:48:52 | 显示全部楼层 |阅读模式
应该是CHROOT的问题:
ph7:/home# chroot ~ftp /bin/ls -l
total 20
d--x--x--x    2 0        0            4096 Aug 29 08:48 bin
d--x--x--x    2 0        0            4096 Sep 18 01:54 etc
d--x--x--x    2 0        0            4096 Sep 18 03:34 lib
dr-xr-xr-x    3 0        0            4096 Sep 17 03:20 pub
-rw-r--r--    1 0        0             123 Sep 17 03:48 welcome.msg

不知道缺少什么?

kanaka 的大作中有这么一句:

Anonymous FTP users will only see UID and GID numbers,instead of names, because the libnss_files.so library hasn't installed.

It is not installed by default, since there is no easy way to find out what version we need to install.

If you want to install it manually, it should be palced in /home/ftp/lib,owned by root, and with permissions of 444 (r--r--r--)


我试着在/lib下拷了一个libnss_files.so到~ftp/lib下,可是还是不行。搞不懂了,今天在网上找了一个上午也没有找到解答。

郁闷ing。。
发表于 2003-9-18 12:40:24 | 显示全部楼层

~ftp的环境中有 /etc/{passwd,group} 吗?

要将 id 解释成 name 的话,要这两个文件才行吧?
 楼主| 发表于 2003-9-18 13:22:09 | 显示全部楼层

谢谢,但group passwd两个文件是存在的,而且格式是对的。

空。
 楼主| 发表于 2003-9-19 10:03:38 | 显示全部楼层

终于发现:

在/lib下拷了一个libnss_files到~ftp/lib下,改名成libnss_files.so.2而不是libnss_files.so就行。注意文件名,权限。

给出一个详细的list,留给有需要的人:


# ll
total 1388
-r-xr-xr-x    1 root     root        90210 Sep 19 09:55 ld-linux.so.2
-r--r--r--    1 root     root      1153784 Sep 19 09:55 libc.so.6
-r--r--r--    1 root     root        32668 Sep 19 10:00 libnss_files.so.2
-r--r--r--    1 root     root       102172 Sep 19 09:55 libpthread.so.0
-r--r--r--    1 root     root        23388 Sep 19 09:55 librt.so.1


结贴。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表