5

So I have a shell on a remote server.

    [alexandros.dimos@fep-62-1 ~]$ whoami
    alexandros.dimos
    [alexandros.dimos@fep-62-1 ~]$ cat /etc/passwd
    this too long the point is my user is not there

    [alexandros.dimos@fep-62-1 ~]$ uname -a
    Linux fep-62-1.grid.pub.ro 2.6.32-431.5.1.el6.x86_64 #1 SMP Tue Feb 11 13:30:01 CST 2014 x86_64 x86_64 x86_64 GNU/Linux

From this uname command I can't even understand what kind of linux server it is.

Can someone explain me how is this possible and where can I read more about this kind of server?

EDIT: the passwd file

root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
uucp:x:10:14:uucp:/var/spool/uucp:/sbin/nologin
operator:x:11:0:operator:/root:/sbin/nologin
games:x:12:100:games:/usr/games:/sbin/nologin
gopher:x:13:30:gopher:/var/gopher:/sbin/nologin
ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
nobody:x:99:99:Nobody:/:/sbin/nologin
dbus:x:81:81:System message bus:/:/sbin/nologin
usbmuxd:x:113:113:usbmuxd user:/:/sbin/nologin
avahi-autoipd:x:170:170:Avahi IPv4LL Stack:/var/lib/avahi-autoipd:/sbin/nologin
vcsa:x:69:69:virtual console memory owner:/dev:/sbin/nologin
rpc:x:32:32:Rpcbind Daemon:/var/cache/rpcbind:/sbin/nologin
rtkit:x:499:496:RealtimeKit:/proc:/sbin/nologin
saslauth:x:498:76:"Saslauthd user":/var/empty/saslauth:/sbin/nologin
postfix:x:89:89::/var/spool/postfix:/sbin/nologin
ntp:x:38:38::/etc/ntp:/sbin/nologin
avahi:x:70:70:Avahi mDNS/DNS-SD Stack:/var/run/avahi-daemon:/sbin/nologin
rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin
nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin
openvpn:x:497:495:OpenVPN:/etc/openvpn:/sbin/nologin
haldaemon:x:68:68:HAL daemon:/:/sbin/nologin
pulse:x:496:494:PulseAudio System Daemon:/var/run/pulse:/sbin/nologin
gdm:x:42:42::/var/lib/gdm:/sbin/nologin
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
tcpdump:x:72:72::/:/sbin/nologin
razvan:x:500:500:Razvan Dobre:/home/razvan:/bin/bash
apache:x:48:48:Apache:/var/www:/sbin/nologin
nagios:x:495:489::/var/spool/nagios:/sbin/nologin
nrpe:x:494:488:NRPE user for the NRPE service:/var/run/nrpe:/sbin/nologin
mapred:x:202:123:Hadoop MapReduce:/tmp:/bin/bash
hdfs:x:201:123:Hadoop HDFS:/tmp:/bin/bash
oprofile:x:16:16:Special user account to be used by OProfile:/home/oprofile:/sbin/nologin
qemu:x:107:107:qemu user:/:/sbin/nologin
dhcpd:x:177:177:DHCP server:/:/sbin/nologin

and after

[alexandros.dimos@fep-62-1 ~]$ lsb_release -a
LSB Version:    :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: Scientific
Description:    Scientific Linux release 6.2 (Carbon)
Release:    6.2
Codename:   Carbon
2
  • In /etc/passwd, is there anything like +@groupName? Also, this is likely a virtualized server running on OpenVZ or something similar. Commented Jul 31, 2014 at 11:58
  • 1
    Well 1 thing is for sure: it is not Ubuntu so offtopic ;) Just to help out: any respectable linux has an "issue" file (lsb_release -a and /etc/issue). "fep" is probably front end processor(?)
    – Rinzwind
    Commented Jul 31, 2014 at 11:59

1 Answer 1

8

/etc/passwd and /etc/shadow are not the only places where users can be defined. These files define only the users which local users.

You can add remote sources of users and groups definition, like :

  • an LDAP server
  • a NIS/NIS+ server
  • a SAMBA or Windows Domain Controller server
  • ...

To review all users & groups known by your server, from whatever sources they come, you would preferably use the getent command :

getent passwd

will list all users known by the system, the ones from /etc/passwd like the one from remote servers.

For more information about the configuration of users coming from remote servers, I suggest you read any resource about NSS (Name Service Switch) like man nsswitch.conf or this article on Wikipedia.

2
  • 1
    the getent passwd command shows me the same passwd
    – Redridge
    Commented Jul 31, 2014 at 12:06
  • You can try getent passwd youruser
    – alegria
    Commented Apr 22, 2022 at 9:56

Not the answer you're looking for? Browse other questions tagged .