System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

accidentaly deleted files in /usr/net/servers/lanman - howto recover

Bengt Nilsson_2
Regular Advisor

accidentaly deleted files in /usr/net/servers/lanman - howto recover

The system is a DS10 running tru64-5.1B-4.

I accidentally deleted some files in /usr/net/servers, not being aware that this was used by system, I thought they were mine(:

'df' shows
mc2-p007# df
Filesystem 512-blocks Used Avail Capacity Mounted on
root_domain#root 1048624 310590 716944 31% /
/proc 0 0 0 100% /proc
usr_domain#usr 8388608 5555724 1550720 79% /usr
usr_domain#var 8388608 1129526 1550720 43% /var
user_dmn#user_fs 497680768 441349260 56331508 89% /usr/users
user_dmn#asu_fs 497680768 2133990 62593888 4% /usr/asu
file-on-file mount 0 0 0 100% /usr/net/servers/lanman/TCPpipes/mc2-p007-knblink
file-on-file mount 0 0 0 100% /usr/net/servers/lanman/TCPpipes/mc2-p007-1169
file-on-file mount 0 0 0 100% /usr/net/servers/lanman/TCPpipes/mc2-p007-mc2axp1202020202020202020
file-on-file mount 0 0 0 100% /usr/net/servers/lanman/TCPpipes/mc2-p007-*smbserver202020202020
file-on-file mount 0 0 0 100% /usr/net/servers/lanman/mailslot/lmxservice.MC2AXP1
file-on-file mount 0 0 0 100% /usr/net/servers/lanman/.ctrlpipe.MC2AXP1
file-on-file mount 0 0 0 100% /usr/net/servers/lanman/mailslot/net/netlogon.MC2AXP1
file-on-file mount 0 0 0 100% /usr/net/servers/lanman/mailslot/net/ntlogon.MC2AXP1
file-on-file mount 0 0 0 100% /usr/net/servers/lanman/mailslot/lmxalert.MC2AXP1
file-on-file mount 0 0 0 100% /usr/net/servers/lanman/mailslot/browse.MC2AXP1

All of the /usr/net/servers/lanman files are zero in size, and I guess this is not right. The function "adduser" does not work anymore.
They seems to be temporary files.

Question: Is it safe to reboot and hope it will fix itself?
Or do I need to download from backup?

BN


11 REPLIES
Steven Schweda
Honored Contributor

Re: accidentaly deleted files in /usr/net/servers/lanman - howto recover

I don't have a "/usr/net", so I know even
less than usual.
Bengt Nilsson_2
Regular Advisor

Re: accidentaly deleted files in /usr/net/servers/lanman - howto recover

I think it may be connected to ASU, the Windows server.
Since adduser is not working (says Resource lost) I think something fails when a Windows user id is to be created in parallel to the regular user id.
Bengt Nilsson_2
Regular Advisor

Re: accidentaly deleted files in /usr/net/servers/lanman - howto recover

But since you don't have /usr/net, maybe it is safe to reboot, and not expect a deep impact crash?
Steven Schweda
Honored Contributor

Re: accidentaly deleted files in /usr/net/servers/lanman - howto recover

> [...] maybe it is safe to reboot [...]

I'd guess that Tru64 itself won't care. (But
what do I know?)
Pieter 't Hart
Honored Contributor

Re: accidentaly deleted files in /usr/net/servers/lanman - howto recover

The normal way to get files back is to restore them from a backup.....

>>> The function "adduser" does not work anymore <<<
do you get any errormessage?

as you post mentions "lanman" I relate them to some kind of file-server service running on this host.
if you got Pathworks or Samba running.
try respective commands to restart the services/daemons .

You don't report what files are deleted ("some" files), only what filesystems are left?
These files will be locked and prevented from deletion, so the zero-size will also have been reported before the delete.

The TCPpipes look like not real files but for "network" communication between processes.

The file-on-file mount maybe files that are containers to present by the fileserver as a file-share.
"df" won't be able to read the mounted fil-on-file filesystem, so it may report a wrong size.
Bengt Nilsson_2
Regular Advisor

Re: accidentaly deleted files in /usr/net/servers/lanman - howto recover

This is what happens:

mc2-p007# dxaccounts
Resources lost
mc2-p007#

Bengt Nilsson_2
Regular Advisor

Re: accidentaly deleted files in /usr/net/servers/lanman - howto recover

..and this:

mc2-p007# adduser

Enter a login name for the new user (for example, john): fakeuser
Enter a UID for (fakeuser) [33887]:
Enter a full name for (fakeuser): Fake User
Enter a login group for (fakeuser) [users]:

Enter another group that (fakeuser) should be a member of.
( only if none):
Enter a parent directory for (fakeuser) [/usr/users]:
The shells are:

/usr/bin/sh /usr/bin/ksh /bin/sh /bin/ksh
/usr/bin/csh /usr/bin/posix/sh /bin/csh

Enter a login shell for (fakeuser) [/bin/sh]:

Adding new user...
/usr/sbin/adduser[430]: 170025 Resources lost
Error, exiting useradd /usr/sbin/adduser. Check /etc/passwd.
mc2-p007#
Pieter 't Hart
Honored Contributor

Re: accidentaly deleted files in /usr/net/servers/lanman - howto recover

the adduser script collects info to create a new user, but executes another binary (useradd) to do the real work.
the "Check /etc/passwd" comes from the execution status "failure" of this binary.

the "/usr/asu" directory points to "Advanced Server for UNIX (ASU)"

I think the home-share location of PC-users (ASU) is missing.
This will not be /usr/users, but maybe something like /usr/net/servers/lanman/netlogon.

Try "/usr/sbin/useradd -D" to display default values for useradd.
and see if directories mentioned in the defaults exist.
you may also find info in the /etc/passwd file for those home-directories.
Bengt Nilsson_2
Regular Advisor

Re: accidentaly deleted files in /usr/net/servers/lanman - howto recover

/usr/sbin/useradd -D produced "Resources lost".

Here is what I have in the backup:
recover> ls
.LCK.ctrl datafiles ntprint timex transports.ini.backup.280441 tsh6.dat
.ctrlpipe.MC2AXP1 debug psinfo.exe tmp transports.ini.backup.95203 tsh7.dat
RSXSvc.exe domains regfiles transports.ini tsh1.dat tsh8.dat
TCPpipes fxsvc.exe repl transports.ini.backup.168029 tsh10.dat tsh9.dat
addon go.bat samsave transports.ini.backup.169938 tsh11.dat upgrade_bin
bin lanman.ini scanner.ini transports.ini.backup.170538 tsh12.dat
brute.dic logs scripts transports.ini.backup.18609 tsh13.dat
clipr mailslot service transports.ini.backup.23827 tsh2.dat
core monitorsys.dll shares transports.ini.backup.24283 tsh3.dat
customs msgfiles spool transports.ini.backup.25344 tsh4.dat
recover>

And here is what I have in /usr/net/servers/lanman
mc2-p007# pwd
/usr/net/servers/lanman
mc2-p007# ls
.ctrlpipe.MC2AXP1 TCPpipes mailslot
mc2-p007#

Apparently a lot is missing.
Right now I am waiting for our not-so-flexible-direct-to tape backup system to complete a very important backup from another system which is likley to crash at any moment, before I can do the actual restore of these files. It will take a few hours more.

I will tell you about the result.


Bengt Nilsson_2
Regular Advisor

Re: accidentaly deleted files in /usr/net/servers/lanman - howto recover

Finally, I was able to restore the missing files.
As far as I can tell, functionality is now restored.
Thanks for your support.
Bengt Nilsson_2
Regular Advisor

Re: accidentaly deleted files in /usr/net/servers/lanman - howto recover

Closing..