LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   i messed somethin up (https://www.linuxquestions.org/questions/linux-newbie-8/i-messed-somethin-up-466435/)

matt kramer 07-21-2006 11:02 PM

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

lockpicker 07-21-2006 11:25 PM

use runlevel 1 and rename /etc/ptmp to ptmp.old and /etc/gtmp to gtmp.old
that'll hopefully fix it!!

matt kramer 07-21-2006 11:50 PM

oops sorry for the extra post.....just read on

matt kramer 07-21-2006 11:51 PM

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 :)

matt kramer 07-22-2006 05:03 PM

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


All times are GMT -5. The time now is 08:50 AM.