Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Aug 1997 12:08:55 -0700 (PDT)
From:      schweikh@noc.dfn.de
To:        freebsd-gnats-submit@FreeBSD.ORG
Subject:   bin/4238: chpass only occasionally works in conjunction with ed
Message-ID:  <199708061908.MAA13607@hub.freebsd.org>
Resent-Message-ID: <199708061910.MAA13720@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         4238
>Category:       bin
>Synopsis:       chpass only occasionally works in conjunction with ed
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug  6 12:10:01 PDT 1997
>Last-Modified:
>Originator:     Jens Schweikhardt
>Organization:
DFN
>Release:        2.2.2-Release
>Environment:
2.2.2-Release HAL9000
>Description:
When I try to change the home directory of user 'toor' from
/root to whatever using the editor ed (see below) and chpass
then chpass only accepts the changes occasionally. IOW, I try
it between 2 and a dozen times until it succeeds. I read the
man page of chpass and could not find any explanation.
>How-To-Repeat:
% printf ',s,: /root,: /opt/home/root,\nw\nq\n' | EDITOR=ed chpass toor
282
291
chpass: no changes made
chpass: /etc/master.passwd: unchanged
% printf ',s,: /root,: /opt/home/root,\nw\nq\n' | EDITOR=ed chpass toor
282
291
chpass: no changes made
chpass: /etc/master.passwd: unchanged
% printf ',s,: /root,: /opt/home/root,\nw\nq\n' | EDITOR=ed chpass toor
282
291
chpass: no changes made
chpass: /etc/master.passwd: unchanged
% printf ',s,: /root,: /opt/home/root,\nw\nq\n' | EDITOR=ed chpass toor
282
291
chpass: no changes made
chpass: /etc/master.passwd: unchanged
% printf ',s,: /root,: /opt/home/root,\nw\nq\n' | EDITOR=ed chpass toor
282
291
chpass: rebuilding the database...
chpass: done

Notes:
282 is the number of chars before editing
291 is the number after the substitution is done
and the file is written, so the substitution did *not* fail.

If this is the correct behaviour of chpass then I'm slightly
confused. Doing the change interactively using vi always
succeeds right away.

And no, the system is not busy -- there is no one editing
password information databases other than me.
>Fix:

>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708061908.MAA13607>