Commit Graph

79 Commits

Author SHA1 Message Date
Bill Paul
44440ae8b2 Small tweak: the 'is exisating password an empty string' check isn't
quite right. (Thic causes you to get prompted for an 'Old Password' when
changing someone's NIS password even if your password isn't set yet.)
Do it like local_passwd.c does.
1995-12-09 19:10:20 +00:00
Justin T. Gibbs
5601df6e0c Point passwd to the new locations of kpasswd.c and kadm.h. 1995-09-14 21:02:16 +00:00
Mark Murray
492412e2d0 Add pw_yp.c to SRCS. This is code that was moved to chpass, but passwd still
needs it to build.
1995-09-03 11:40:37 +00:00
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
Bruce Evans
c555738304 Remove bogus ${DESTDIR}s from LINKS.
Keep DPADD up to date with LDADD.

bsd.prog.mk's install rule can't handle schg'ed links, so ugly
beforeinstall and afterinstall rules are required.
1995-08-17 11:26:42 +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
14eb79c475 Argh!! Got the arguments in the printf() backwards. 1995-06-24 18:12:17 +00:00
Bill Paul
1724847d45 Whoops: getnewpasswd() always says "Changing local password for foo".
Change things slightly so this message says "local" or "YP" as needed
so we can use it for both NIS and local password changes without
confusing people.
1995-06-24 18:08:25 +00:00
Bill Paul
a7aa6bd1ea getnewyppasswd() in yp_passwd.c doesn't generate correct encrypted
password strings when DES isn't used; somehow the encrypted password
is corrupted and it winds up containing control chars, which yppasswdd
subsequently rejects. This breaks yppasswd on non-DES FreeBSD systems
using NIS.

Fix: scrap getnewyppasswd() entirely and use getnewpasswd() from
local_password.c, since it already works properly and is virtually
identical to getnewyppasswd() anyway. (Wish I'd noticed this sooner.)

This fixes a problem just reported on comp.unix.bsd.freebsd.misc.
1995-06-24 17:47:51 +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
Rodney W. Grimes
d3628763db Merge RELENG_2_0_5 into HEAD 1995-06-11 19:33:05 +00:00
Rodney W. Grimes
7799f52a32 Remove trailing whitespace. 1995-05-30 06:41:30 +00:00
Bill Paul
8ae049436c Remove references to yppasswd_xdr.c: the stuff in this file already exists
in librpcsvc. Add -lrpcsvc to LDADD instead.
1995-04-01 19:19:15 +00:00
Nate Williams
2899d0086a Removed redundant function to64() which also exists in local_passwd.c 1995-03-08 18:05:50 +00:00
Rodney W. Grimes
36d9739b48 Remove usage of LINKS and LN_FLAGS=-s, this does not do the correct thing
for symbolic links when $DESTDIR is set.

Add afterinstall: target to handle symbolic link creation.
1995-02-14 21:08:45 +00:00
Bill Paul
01ed185959 Changed passwd's Makefile to use the built-in LINKS mechanism to create
the symlinks for yppasswd & friends (we still can't use hard links
because passwd is installed immutable). This would have been simpler
if the LN_FLAGS variable hadn't chosen to wait until now before leaping
out of the /usr/share/mk directory and biting me in the ass. (And thus,
I was enlightened.)
1995-02-14 15:38:13 +00:00
Andrey A. Chernov
279c49616d Merge with eBones stuff
Submitted by: mark@grondar.za
1995-02-11 18:20:06 +00:00
Bill Paul
9e9a89bb1f cleaned up and modified slightly to reflect changes 1995-02-01 23:47:04 +00:00
Bill Paul
87a8966828 Cleaned up Makefile a little, added man page links from ypchsh.1 ypchfn.1
and ypchpass.1 to yppasswd.1. Also fixed a typo: ypshfn != ypchfn.
1995-02-01 23:46:20 +00:00
Bill Paul
7506dfc15e Changed passwd/yppasswd's Makefile to create all symbolic links instead
of hard links: since passwd is installed immutable, an attempt to make
a hard link to it during a 'make install' would fail. I didn't notice
this conflict because my /usr directory is an NFS filesystem mounted from a
SunOS server, so the special file mode flags had no effecti when I tested
everything on my machine. Live and learn.
1995-02-01 05:55:18 +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
Garrett Wollman
0cd34073b2 Kill old Kerberos password-changing support:
1) It was export-controlled.
2) It used some ad-hoc protocol invented by Berkeley in ignorance of the
   standard MIT distribution's way of doing it (which makes it useless
   to most people).

This should be fixed once we have `kadmin'/`kadmind'.
1995-01-19 21:03:48 +00:00
Garrett Wollman
a38c3127e1 Add distribution=krb for P-HK 1994-11-20 23:23:28 +00:00
Poul-Henning Kamp
3dfc7586e5 Always make the salt a 8 char string (incl '\0') for algorithms that can use it 1994-11-06 21:08:19 +00:00
Geoff Rehmet
c368d11dd2 First level of changes for bringing in eBones (kerberos).
- Get rid of inverse logic (NOKERBEROS and NOEBONES) in src/makefile,
and replace with MAKE_KERBEROS and MAKE_EBONES.  (Far fewer contortions,
and both default to off.)  IF YOU WANT KERBEROS, YOU HAVE TO EXPLICITLY
DEFINE ONE OF THESE.
- Make Makefiles kerberos-aware.
1994-09-29 13:06:54 +00:00
Geoff Rehmet
4714bb15be LDADD= -lcrypt
Submitted by:	Geoff
1994-08-20 21:19:46 +00:00
Garrett Wollman
580f1067d3 Don't use Kerberos yet, we aren't ready for it. 1994-08-05 20:39:34 +00:00
Rodney W. Grimes
9b50d90275 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00