LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-21-2006, 11:02 PM   #1
matt kramer
LQ Newbie
 
Registered: Jul 2006
Distribution: Mandrake
Posts: 29

Rep: Reputation: 15
i messed somethin up


i have no idea what i did but now when i try to log into "userdrak" which is my manage user gui i get this thing:

Quote:
Cannot lock user lib, file /etc/ptmp or etc/gtmp exist
all i did was extract a file.

please help
 
Old 07-21-2006, 11:25 PM   #2
lockpicker
Member
 
Registered: Feb 2006
Location: Sikkim Manipal Institute of Technology, Sikkim
Distribution: Slackware 10.2
Posts: 80

Rep: Reputation: 15
use runlevel 1 and rename /etc/ptmp to ptmp.old and /etc/gtmp to gtmp.old
that'll hopefully fix it!!
 
Old 07-21-2006, 11:50 PM   #3
matt kramer
LQ Newbie
 
Registered: Jul 2006
Distribution: Mandrake
Posts: 29

Original Poster
Rep: Reputation: 15
oops sorry for the extra post.....just read on

Last edited by matt kramer; 07-21-2006 at 11:52 PM.
 
Old 07-21-2006, 11:51 PM   #4
matt kramer
LQ Newbie
 
Registered: Jul 2006
Distribution: Mandrake
Posts: 29

Original Poster
Rep: Reputation: 15
problem fixed but i don't know if i created another one

well that didn't work but actually removing both of those did. you telling me to rename them made me believe they weren't vitally important so i decided to dump 'em and that worked.

any idea what those files are? i mean, i'd like to understand what they are, why they created a problem and why removing them fixed the problem if anyone knows.

thanks
 
Old 07-22-2006, 05:03 PM   #5
matt kramer
LQ Newbie
 
Registered: Jul 2006
Distribution: Mandrake
Posts: 29

Original Poster
Rep: Reputation: 15
Quote:
/etc/ptmp and /etc/gtmp are so called lock files. They're used to make sure only one program is accessing a resource at the time, in this case: user(ptmp) and group (gtmp) database. If a program (or system) crash happends, it may be that it doesn't delete it when exitting. It means when another process wants to access the resource it looks for the lock file. It exists, so the programs quits. If you delete the unneded lock file, the problem disappears. Of course, deleting lock files when they're needed is a short way to trouble.

In your case the situation looks more compilicated. My guess is that a program runs at start that creates the lock files (it's probably still running). If you stop it, the files should be removed. After a proper shutdown the program should nt start again on its own (if it's not a service, but that's unlikely).

So, you need to find the program. Open a terminal and run
ps aux
It should show you the fill process list. It may be quite long. Browse it and try to find suspected rpograms. My guess is that it may be userdrake. Look if it's on the list. If it is, kill it. You kill a process using the 'kill' command with paraameter which is process ID number. The ID number is the second column of ps aux output. So, if the process ID is 4567, run
kill 4569
If it doesn't help,
kill -9 4567
(it's a kind of 'force' mode).
You can also run pkill with parameter beeing executable name, for example
pkill userdrake
Warning: all copies will be stopped when you use this method.

To kill the process you may need to temporary become root. To do this run
su
then type root password when you ask it. When you're root, kill -9 will always stop a process.

After finding and stopping the program, it should start working correctly.
http://experts.about.com/q/Unix-Linu...-won-t-run.htm
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
messed up X crispy_420 Linux - Newbie 1 09-09-2005 01:23 AM
IS THERE ANY STAND-BY or somethin' in RH9.0 shiben Linux - General 7 10-20-2003 06:31 AM
i screwed somethin up! xune Linux - Software 4 10-02-2003 07:20 PM
I messed up Please help mcgram5 General 4 03-18-2003 10:47 PM
does Lunix have somethin like defrag? Chooco Linux - Software 18 05-28-2002 09:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:07 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration