By examining the first, third and last (seventh) fields of the /etc/passwd file, determine the userid and login shell for your username, the user root, and the user nobody (yes, there is a system user with the username "nobody"). Create simple files in your home directory, called my.uid, my.shell, root.uid, root.shell, nobody.uid, and nobody.shell, which contain only the appropriate information on a single line.

For example, if the user nobody's login shell were /bin/bash, the following command would easily create the appropriate file.

[student@station student]$ echo /bin/bash > nobody.shell
[student@station student]$ cat nobody.shell
/bin/bash

I don't know how to find the UID because when I opened the passwd file the first was root, but the third and seventh fields were completely different. Any help?

Hello,

The UID is the user id and it is stored in the /etc/passwd file. Below is a link to a site the explains the format of the date in the file:
http://en.wikipedia.org/wiki/Passwd

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.