Commit Graph

6 Commits

Author SHA1 Message Date
Bill Paul b62f3dc428 Bug fix: use the use_yp() function in the chpass(1) code to determine
correctly whether a user is local or NIS (or both, or neither). If you
have a user that exists locally but not in NIS, passwd(1) could get
confused and try to submit the password change to NIS. (Fortunately,
yppasswdd is smart enough to spot the error and reject the change.)

Bug reported by: Charles Owens <owensc@enc.edu>
1995-09-02 04:02:28 +00:00
Bill Paul a3ce11a24d Remove the ypchfn/ypchsh stuff from passwd and leave just the
yppasswd support. The rest is moving into chpass.
1995-08-13 16:07:36 +00:00
Bill Paul 8a363d18bb Patch to fix PR #518. In a system with no NIS, passwd will complain
that it can't contact an NIS server when asked to change the password
of an invalid user. It should say 'unknown user' instead.

The fix is to check for the _PW_KEYYPENABLED flag in the password
database and only roll over into the yppasswd stuff if the flag
is enabled (this means passwd will not behave as yppasswd if
there are no +::::::::: entries in /etc/master.passwd). If
NIS is enabled but the user says 'passwd -l foouser' where
foouser exists in the NIS maps, but not in /etc/master.passwd,
we also say 'unknown user.' This is so we don't outsmart ourselves:
specifying the -l flag restricts passwd to the local password database
even if NIS is enabled.

This change should probably be merged into 2.1.
1995-06-16 03:33:10 +00:00
Bill Paul 9e32e2330f Obtained from: The NYS project
This is the first round of changes to incorporate YP server functionality
into FreeBSD. This particular change allows passwd to change either the
local or NIS password, as well as the NIS GECOS and shell information.

Essentially, I've taken passwd(1) and yppasswd from the yppasswd-0.5
distribution (which is part of the NYS project -- a project to provide
a GNU GPL'ed suite of NIS tools) and rammed them into each other
at high speed. I've tried my best to make this co-exist with the
Kerberos stuff, but since I don't run Kerberos I don't have an easy
way to verify that it all works. If you choose any Kerberos flags
then the YP checks should be bypassed, but that may not be enough.
I'll modify it some more if it turns out I broke something. For now,
support for localand NIS passwords is pretty solid:

- If you simply type 'passwd,' the program checks to see if you exist
  in the local pwd.db database. If not, you get bounced to YP.

- If you try to force local functionality with the -l flag and you
  don't exist locally, you get an error.

The -y flag can be used to force YP functionality. -f and -s let you
change your full name and shell (respectively). -f *and* -s let you
change all of your 'account information.'

ypchfn, ypchsh, yppasswd and ypchpass are all links to passwd.
1995-01-31 08:34:16 +00:00
Garrett Wollman 925704439a Update for new kpasswd interface. 1995-01-20 22:03:36 +00:00
Rodney W. Grimes 9b50d90275 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00