Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Sep 2000 09:16:22 -0400 (EDT)
From:      Ralph Huntington <rjh@mohawk.net>
To:        questions@FreeBSD.org
Subject:   lost lib symlinks
Message-ID:  <Pine.BSF.4.21.0009210852180.47199-100000@mohegan.mohawk.net>

next in thread | raw e-mail | index | archive | help
Has anyone seen anything like this happen?

Something very strange occurred using the pw command (shown below). The
result was the removal of all symlinks in /usr/lib and /usr/local/lib.

This was discovered when a login attempt failed because libcrypt.so.2
could not be found. 

In one form, the pw command is invoked like this to remove a user account

pw userdel -n $user -r

The '-n' means 'name' and is followed by the username to be removed. The
'-r' means 'remove home dir as well'. The argument following the -n switch
is expected to be a username with a unique UID. (All UIDs on these systems
are unique.)

However, the command was invoked incorrectly from a script with a single
digit as the argument to -n rather than with a username, as in

pw userdel -n 5 -r

The pw command hung and had to be killed. The behavior was confirmed by
issuing the command from the command line on a testbed machine. In each
case all the symlinks were deleted from /usr/lib and /us/local/lib and the
process had to be killed.

Both machines are FreeBSD 3.5.1 boxes, one with a custom kernel and the
testbed with the generic kernel. In both cases, restoring the symlinks
restored functionality although it is not known if there are any other
effects from this surprising incident.

Thank you for your attention. Let me know if any further information is
needed.

Ralph Huntington
FreeBSD user since 1995



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0009210852180.47199-100000>