Jump to content

Adding User Problems


Guest Ezekiel
 Share

Recommended Posts

Guest Ezekiel

In Mandrake 9, I keep getting this message whne I go to add users or access them. "cannot lock user lib, file /etc/ptmp or /etc/gtmp exists"

 

I can manually remove these files no problem but why do I get this message? I get it allot...

 

:?

Link to comment
Share on other sites

  • 6 months later...

Is there an answer to this? I get this as well although I found the two files and renamed them in an attempt to get into userdrake. It let me in and allowed me to set up a new user but I cannot log in as the user, I get the message "Logn failed".

 

I am very new to this and cound really use some help (even RTFM if someone can ponit to the right section as I cound not find anything I cound use)

 

Thank you in advance and apologies if I am wasting your time

Link to comment
Share on other sites

You aren't wasting anyone's time. We help eachother for fun :D

 

Well, first of all, sorry because I don't run mandrake 9.* so I don't know what the heck is all this thread about.

 

But, I have some little experience, and I'll give you an advise: Try to avoid as much as possible those 'specific-distro' applications to manage your system. There are other apps which have by far many more acceptance and have being tested by many, many years, and which have become *almost* universal in all GNU/Linux distros. Use them instead.

 

That way you'll learn linux and you wont depend on a particular distribution.

 

For instance, instead of userdrake, use "useradd + passwd" which are (almost) universal (info on man pages)

Link to comment
Share on other sites

I use userdrake with 9, which has the mentioned problem also. Some test show that if I close Userdrake with its File->Exit option it will remove ptmp & gtmp files, otherwise I have to remove them as root.

 

BTW LinuxConf is another GUI user setup tool that works, and allows me to set (G|U)ID which I like to for

my network users (NIS server)...

Link to comment
Share on other sites

Thank you both for the replies, I looked at useradd (and adduser) in the man pages however when I tried to use them I got 'vipw lockfile (/etc/ptmp) is present!' I assume this is the same as the message I got previously from userdrake.

 

What are the files ptmp and gtmp for (I'm guessing temporary files :) ) and will they be missed if I remove them?

 

Thanks again for the quick answers.

Link to comment
Share on other sites

I guess the reason you get the message is that you change something using userdrake (add a user/group or delete a user/group) but didn't press the save button before closing the userdrake. Therefore it creates the temporary files but didn't erase it.

 

If you think your user accounts are fine, then you can delete the files without any guilt whatsoever. If not, well.. you can delete them anyway and re-change them later.

Link to comment
Share on other sites

This error occurs, if the "gerneration" process fo a new group/user in Userdrake get's broke. Then theese two files keep broke, so you'll have to delete them. They are under /etc. After that, all will work well again.

 

--> Deleting users: If you delete an user, be sure to delete the same group as well, this is not automatic. Missing this leads in unused groups and inkonsistent UID/GUID pairs, what is not "dangerous" but unpretty

Link to comment
Share on other sites

OK, I removed the gtmp and ptmp files and it let me set up a new user (one using userdrake) and the other using adduser. I checked both users in linuxconf and they looked the same as an existing user that was set up as a part of the install. Neither of the new users can login, I just get 'Login Failed' :banghead:

 

linuxconf tells me that no passwords are expected so I am fairly sure that it is not an incorrect password. Is there anyway to attempt a login but get an expanded error message (Login Failed is not particularly helpful (I appreciate that this is the point :) )

 

Once again thanks for the responses

Link to comment
Share on other sites

The 'universal' way to add an user (apart form editing by hand /etc/{passwd,shadow} and create the user's files) is run "useradd + passwd"

 

~# useradd foo

~# passwd foo

Changing password for user foo

New UNIX password: ********

Retype new UNIX password: *******

passwd: all authentication tokens updated successfully

~#

 

localhost login: foo

Password: *******

[foo@localhost foo]$ _

Link to comment
Share on other sites

I tried this and it all seemed to work as shown in the first extract however when I attempted the login it told me there was an incorrect password. I attempted to login the user that does work and this still told me the password was incorrect. Am I missing something obvious?

Link to comment
Share on other sites

run "ls -l /etc/*{passwd,shadow}*" to see if there are something extrange.

 

Check if new user's entry are found in each one of those files (/etc/passwd and /etc/shadow). Ofcouse don't post the entries here ;)

 

Are the new user's home created?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...