Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Passwd
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Password file == The <code>/etc/passwd</code> file is a text-based database of information about [[User (computing)|users]] that may [[login|log into]] the system or other operating system user identities that own running processes. In many operating systems, this file is just one of many possible back-ends for the more general [[passwd (database)|passwd name service]]. The file's name originates from one of its initial functions as it contained the data used to verify [[password]]s of user accounts. However, on modern [[Unix]] systems the security-sensitive password information is instead often stored in a different file using shadow passwords, or other database implementations. The <code>/etc/passwd</code> file typically has [[file system permissions]] that allow it to be readable by all users of the system (''world-readable''), although it may only be modified by the [[superuser]] or by using a few special purpose privileged commands. The <code>/etc/passwd</code> file is a [[text file]] with one record per [[Line (text file)|line]], each describing a [[User (computing)|user account]]. Each record consists of seven fields separated by [[Colon (punctuation)|colons]]. The ordering of the records within the file is generally unimportant. An example record may be: {{sxhl| jsmith:x:1001:1000:Joe Smith,Room 1007,(234)555-8910,(234)555-0044,email:/home/jsmith:/bin/sh |unixconfig}} The fields, in order from left to right, are:<ref>[http://www.cyberciti.biz/faq/understanding-etcpasswd-file-format/ Understanding <code>/etc/passwd</code> File Format]</ref> # {{code|jsmith}}: User name: the string a user would type in when logging into the operating system: the [[logname]]. Must be unique across users listed in the file. # {{code|x}}: Information used to validate a user's [[password]]. The format is the same as that of the analogous field in the [[Passwd#Shadow file|shadow password]] file, with the additional convention that setting it to "x" means the actual password is found in the shadow file, a common occurrence on modern systems.<ref name=linuxman>{{cite web|url=http://man7.org/linux/man-pages/man5/passwd.5.html |title=passwd(5) - Linux manual page |publisher=Man7.org |access-date=2014-08-25}}</ref> # {{code|1001}}: [[User identifier (Unix)|user identifier]] number, used by the operating system for internal purposes. It must be unique as it identifies users uniquely. # {{code|1000}}: [[Group identifier (Unix)|group identifier]] number, which identifies the primary group of the user; all files that are created by this user may initially be accessible to this group. # {{code|Joe Smith,Room 1007...}}: [[Gecos field]], commentary that describes the person or account. Typically, this is a set of comma-separated values including the user's full name and contact details.<ref>{{Cite web|url=https://linuxhint.com/view-understand-etc-passwd-file-linux/|title=How to View and Understand the /etc/passwd file in Linux|first=David|last=Adams}}</ref> # {{code|/home/jsmith}}: Path to the user's [[home directory]]. # {{code|/bin/sh}}: Program that is started every time the user logs into the system. For an interactive user, this is usually one of the system's [[command line interpreter]]s ([[Shell (computing)|shells]]).
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)