From owner-freebsd-questions Thu Sep 21 6:15:11 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mohegan.mohawk.net (mohegan.mohawk.net [63.66.68.21]) by hub.freebsd.org (Postfix) with ESMTP id 5C34937B42C for ; Thu, 21 Sep 2000 06:15:09 -0700 (PDT) Received: from mohegan.mohawk.net (mohegan.mohawk.net [63.66.68.21]) by mohegan.mohawk.net (8.9.3/8.9.3) with ESMTP id JAA48932 for ; Thu, 21 Sep 2000 09:16:22 -0400 (EDT) (envelope-from rjh@mohawk.net) Date: Thu, 21 Sep 2000 09:16:22 -0400 (EDT) From: Ralph Huntington To: questions@FreeBSD.org Subject: lost lib symlinks Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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