What file(s) am I?

In UNIX, if everything is a file, then what file(s) am I, as a user?

You are lines in /etc/passwd, /etc/shadow, and /etc/groups. These are the bare minimum for a user to login on a UNIX system normally. It's possible for root to force a login into arbitrary UID numbers that don't actually exist, though. Nothing explodes when this happens. They just show up as a number instead of a name, start sitting in /, and have no home directory, no groups, no anything.

Real, actual, login-as-people users probably have a folder under /home/ as well.

1 Like

You are /dev/null.

Sorry, I couldn't resist. :slight_smile:

lol

1 Like

ROFL classic!! :smiley:

1 Like

This assumption is wrong. What was the full quote in context?

You the user are just an configurable data item.

1 Like

I lol'd :stuck_out_tongue:

I based this on what I've read (cs.bgu.ac.il/~arik/usail/concepts/filesystems/everything-is-a-file.html) and what other people told me about UNIX (-based) OS'es. IIRC among one of them was a Linux sysadmin.
Feel free to correct me though, I would love to learn why this assumption is wrong.

methyl is on the correct track, IMO.

The file statement is correct, but individual user accounts are a subset of a group of files. Users change the program state of the kernel because they initiate processes through direct connections that they control.

This is what is meant by the link: any physical entity that is directly/indirectly attached to the computer makes that attachment to the kernel via a file - disks, network connections, terminals, remote connections. Whatever. Since humans are not directly tcp/ip, fddi, or fibre channel (etc) connected, they are not a file, they are parts or subsets of files.

Unless you would like a direct network connection into a wifi NIC into your cerebrum, you have to settle for sub-file status. That won't be available until Diablo III is released (per my son). Sorry....

I think this thread is kinda soft for for a technical forum....

1 Like

When the URL is corrected it leads to this:
Everything is a File
Unfortuatetly the content is not correct. Don't believe everything you read on the Internet.

The author or the article may have misunderstood the concept of "device-independent input/output" which is one of the fundamentals of predecessors or unix and of unix itself.

1 Like

Indeed. Hopefully, not everything is a file under Unix. What is true is that many OS objects that aren't files on other operating systems, like devices (printers, disks, partitions, network interfaces, serial lines, ...), processes, virtual and physical memory, sockets, named pipes and the likes are files present in most Unix file systems hierarchies.

However, plenty of other OS objects, like partition tables, signals, threads, queues, statistics and others have no direct file equivalent.

In any case, as far as the operating system is concerned, a user (id) is just one of the many properties a process has.

1 Like

I thought that a university website (which is furthermore on top of Google search results) would suffice as a valid learning resource.
I am however eager to learn, so if you have better sources I would love to read and learn about it.