LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-15-2007, 09:54 PM   #1
ews208
LQ Newbie
 
Registered: Aug 2007
Posts: 3

Rep: Reputation: 0
Unhappy Removed .lock files in /etc, now user folders missing


Hi,

I was having trouble adding users on my Fedora Server because I kept getting the message "cannot change password lock file" or "cannot change shadow lock file".

I removed password.lock and shadow.lock and I was still unable to add a user.

Then i did rm *.locks.

Now all of my user folders are gone. The disk space on the drive is still being used but the actual folder is nowhere to be found.

Any help would be appreciated.

Thanks.
 
Old 08-16-2007, 03:16 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
your user folders? you mean the contents of /home? there isno way at all that deleting a lock file can do that... what does "ls -l /home" show? what else were you doing at the time?
 
Old 08-16-2007, 03:34 PM   #3
reverse
Member
 
Registered: Apr 2007
Distribution: Gentoo
Posts: 337

Rep: Reputation: 30
Quote:
there isno way at all that deleting a lock file can do that
Eh.. surely it's *possible* if you really want it to happen I'm thinking: a periodic check for a .lock file -> not found -> rm -rf /home/*
 
Old 08-17-2007, 12:38 AM   #4
ews208
LQ Newbie
 
Registered: Aug 2007
Posts: 3

Original Poster
Rep: Reputation: 0
The way the server is set up, all the home folders are located at /home/personal/username.

When I do a ls -la in /home, the entire /home/personal folder is gone, thus bringing with it all of the individual user folders.

Now, the weird part is that the disk space is still being used. I did a df -h right before everything disappeared and then right after. It was exactly the same.

These folders are also Samba shares that Windows/Mac/Linux users can access. Maybe that has something to do with it?

I was thoroughly caught off guard when this happened because obviously this behaviour should not happen when deleting .lock files.

The only other thing I was doing at the time was untarring an archive file. This was going into /home/personal/user/archivefile. I don't see how that would make a difference either, but you never know.
 
Old 08-17-2007, 02:12 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
short of a disk failure, something else must have happened. this isn't windows, things don't happen without it being requested.

if ti's been moved to somehwere else, try searching the filesystem for a known file name...
Code:
find / -iname afileiremember
 
Old 08-17-2007, 12:40 PM   #6
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Sounds like the kind of situation in which the mount point /home/personal exists, but the partition isn't mounted. ls /home/personal would show nothing. Mount the partition, eh voila, it's all there.

So, is /home/personal on a seperate partition, and is the partition mounted? Look in /etc/mtab for a quick check on the mount status.

Last edited by bigrigdriver; 08-17-2007 at 12:41 PM.
 
Old 08-22-2007, 01:53 PM   #7
ews208
LQ Newbie
 
Registered: Aug 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Smile

I found my mysteriously disappearing home folders. For some unknown reason, when I removed the lock files the home folders were moved into the home folder of the new user I was trying to create. I just moved them back to their proper spot and voila, everything was as it should have been.

It was very strange, but thank you all for the very quick responses.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can anyone tell me whats in these folders i think i removed something adamf4i Ubuntu 34 08-09-2006 12:00 AM
Samba can create new files and folders but access denied in any new folders k.king Linux - Networking 2 01-15-2006 06:14 AM
FC3 All my desktop files and folders are missing! splortz Fedora 2 04-17-2005 12:33 PM
How to add an FTP user who can just read and download the files and folders? yuzuohong Linux - General 1 02-15-2003 12:29 AM
How to Lock Files (/etc/passwd /var/spool/[user] Larry James Programming 3 12-04-2000 11:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration