Quando eu uso o comando id
, ele não resolve nomes de usuários e grupos (por admin
ele funciona):
Usuário backup
e admin
:
backup
:
# id
uid=1005 gid=100 groups=100
admin
:
# id
uid=0(admin) gid=0(administrators) groups=0(administrators),100(everyone)
/etc/passwd
:
# cat /etc/passwd
admin:x:0:0:administrator:/share/homes/admin:/bin/sh
guest:x:65534:65534:guest:/share/homes/guest:/bin/sh
httpdusr:x:99:0:Apache httpd user:/share/homes/httpdusr:/bin/sh
backup:x:1005:100:Linux User,,,:/share/homes/backup:/bin/sh
sshd:x:501:501:Linux User,,,:/tmp:/bin/false
etc/passwd
permissões são assim:
# ls -l passwd
lrwxrwxrwx 1 admin administ 13 Mar 12 23:27 passwd -> config/passwd
# ls -l config/passwd
-rw-r--r-- 1 admin administ 519 Mar 6 09:55 config/passwd
# ls -l config
lrwxrwxrwx 1 admin administ 21 Apr 3 21:47 config -> /mnt/HDA_ROOT/.config/
# ls -ld /mnt/HDA_ROOT/.conf*
-rw-r--r-- 1 admin administ 274 Apr 3 21:47 /mnt/HDA_ROOT/.conf
drw-r--r-- 31 admin administ 4096 Apr 11 10:50 /mnt/HDA_ROOT/.config/
# ls -l /mnt/HDA_ROOT/.config/passwd
-rw-r--r-- 1 admin administ 519 Mar 6 09:55 /mnt/HDA_ROOT/.config/passwd
ls
também não resolve nomes e grupos:
backup
:
# ls -l
lrwxrwxrwx 1 0 0 28 Feb 26 14:20 @Recycle -> /share/homes/@Recycle/backup
drwxr-xr-x 2 1005 100 4096 Apr 10 21:40 test
admin
:
# ls -l
lrwxrwxrwx 1 admin administ 28 Feb 26 14:20 @Recycle -> /share/homes/@Recycle/backup/
drwxr-xr-x 2 backup everyone 4096 Apr 10 21:40 test/
nsswitch.conf tem esta aparência:
# cat /etc/nsswitch.conf
passwd: compat winbind
shadow: compat
group: compat winbind
hosts: files dns wins
bootparams: files
ethers: files
netmasks: files
networks: files
protocols: files
rpc: files
services: files
netgroup: files
publickey: files
automount: files
aliases: files
Qual poderia ser o motivo disso?
O sistema é um QNAP, firmware 4.2.4, eu acredito que isso é baseado no busybox 1.x.
EDIT: parece que não consigo ler passwd
file:
# su backup
# cat /mnt/HDA_ROOT/.config/passwd
cat: can't open '/mnt/HDA_ROOT/.config/passwd': Permission denied
Mas as permissões parecem estar ok ..
# su admin
# ls -l /mnt/HDA_ROOT/.config/passwd
-rw-r--r-- 1 admin administ 519 Mar 6 09:55 /mnt/HDA_ROOT/.config/passwd