54

I am completely new to Linux. While I was watching a tutorial video about Ubuntu, I came across the command passwd. When I tested, it shows;

(current) UNIX password: 
Enter new UNIX password:
Retype new UNIX password:

Why does it say UNIX password? Is there a relation to UNIX?

Nuwan Thisara
  • 2,412
  • 6
  • 31
  • 52
  • 1
    Quote from https://en.wikipedia.org/wiki/Linux "Linux (pronounced Listeni/ˈlɪnəks/ LIN-əks[9][10] or, less frequently, /ˈlaɪnəks/ LYN-əks[10][11]) is a Unix-like computer operating system ...." --- so it's fair that it ask for "UNIX password" :-) – 0x0C4 Nov 26 '16 at 07:02
  • Is the question about how UNIX relates to Linux, or about whether there may be a trademark issue? – jl6 Nov 26 '16 at 08:41
  • 7
    I consider Linux to be "a Unix" (belongs to the general Unix family in terms of [design and behaviour](https://en.wikipedia.org/wiki/Unix_philosophy)). Some people call this "Unix-like" or "Unix clone". It is not, however UNIX® (certified by [the Open Group](https://en.wikipedia.org/wiki/The_Open_Group) as being [SUS](https://en.wikipedia.org/wiki/Single_UNIX_Specification)-compliant, and licensed to use the trademark). – marcelm Nov 26 '16 at 15:08
  • 3
    @marcelm Of course the lack of certification doesn't imply that Linux is missing any of the features needed to qualify for the trademark. At least to me Linux feels more feature-complete than some of the systems which do carry the UNIX trademark. Maybe you already agree with all of this. I can imagine the vendors of many Linux distributions actually consider Linux to be a stronger brand than UNIX, and that's why they don't care to get the certification. – kasperd Nov 26 '16 at 17:36
  • 1
    @jl6 The current wording may have existed for too many years for it to be considered a trademark violation if it was brought to court today. – kasperd Nov 26 '16 at 17:38
  • @kasperd Oh yeah, I didn't mean to imply Linux is inferior; merely that it's not certified/licensed by The Open Group. I'm not actually sure if it would pass SUS-certification, but as you already note that's pretty irrelevant :) – marcelm Nov 26 '16 at 18:13
  • @kasperd however, it might not be possible for Linux to get that certification. IIRC, there are a few specs where Linus, et al. disagree with SUS (see this interesting Q: http://unix.stackexchange.com/a/6172/70524) – muru Nov 27 '16 at 03:57
  • @marcelm Note that there have been a handful of distributions that were actually certified. – chrylis -cautiouslyoptimistic- Nov 28 '16 at 01:58
  • @chrylis A Linux distribution certified SUS-compliant? O.o I don't see any in http://www.opengroup.org/openbrand/register/catalog.htm – muru Nov 28 '16 at 06:32
  • @muru There were a handful, but I don't think there have been any current in a long while (since kernel 2.6, in particular). – chrylis -cautiouslyoptimistic- Nov 28 '16 at 20:05
  • Nuwan, Unix and Linux are like sisters. They are very similar in many ways, and if you know one, it's pretty easy to move over to the other. Did you know that Android runs on Linux, and Apple's iOS on Unix? Thus, very nearly all smartphones and tablets run on *nix! Most web servers also run on Linux or Unix. – Paddy Landau Nov 28 '16 at 23:25

2 Answers2

95

It says UNIX because you're changing the password for authentication provided by the pam_unix PAM module. Quoting the manpage:

NAME
   pam_unix - Module for traditional password authentication

SYNOPSIS
   pam_unix.so [...]

DESCRIPTION
   This is the standard Unix authentication module. It uses standard calls
   from the system's libraries to retrieve and set account information as
   well as authentication. Usually this is obtained from the /etc/passwd
   and the /etc/shadow file as well if shadow is enabled.

It is related to Unix in that it uses the traditional files /etc/passwd and /etc/shadow as the source of authentication.

If you used another PAM module, like pam_ldap for LDAP authentication, it would say LDAP instead of UNIX:

$ passwd
(current) LDAP Password: 
New password: 
Retype new password: 
passwd: password updated successfully
edwinksl
  • 23,569
  • 16
  • 74
  • 100
muru
  • 193,181
  • 53
  • 473
  • 722
  • 4
    @user11153: No, the M in PAM stands for “Modules”, plural. There’s nothing wrong with saying “PAM module”. – Ry- Nov 28 '16 at 11:20
  • Could you clarify how to use another PAM module like in your example? A simple command is enough or does that require config files manipulations? – Marc Vanhoomissen Nov 30 '16 at 10:01
  • @MarcVanhoomissen there's a simple command, `pam-auth-update`, that will let you select PAM authentication modules, which does config file manipulation (edits `/etc/pam.d/common-auth`). Setting up an authentication module, though, is a bit more involved. You might find another answer of mine interesting: http://askubuntu.com/a/724796/158442 (you could extend it using appropriate options to `pam_debug` and different scripts to print whatever you want) – muru Nov 30 '16 at 10:30
1

Simple answer: because Linux is an operating system based on the design of (and offering the full functionality of) the Unix model.

As a result, many tools, commands, software, etc.

Like some versions of 'passwd' were either

  1. Ported directly from other Unix systems to Linux, or
  2. Designed to work with many Unix systems, including Linux.
d a i s y
  • 5,411
  • 9
  • 41
  • 59
delt
  • 333
  • 1
  • 4