March 28, 2024, 07:56:36 PM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: adduser problem -- unable to lock passwd file  (Read 5945 times)

Offline gauravbajaj

  • LST CareTaker
  • Experienced
  • *****
  • Posts: 658
adduser problem -- unable to lock passwd file
« on: May 19, 2005, 10:24:15 AM »
Hi Grp...
I have an problem with my linux system..May be someone can help me..

I wants to add users in my linux system..., previusly my system works fine but now i m tryng to add users then it shows an error like this:

----unable to lock passwd file

So What is this error?? How can i remove this???????????
Plzz help me, i m not able to add local users in my linux machine.........
Gaurav

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
adduser problem -- unable to lock passwd file
« Reply #1 on: May 19, 2005, 04:59:56 PM »
for this there can be two reasons..

a . The /etc/passwd file is used by another process
or
b. You are not having proper permission to modify it.

To make sure u are having right privilages..

do ..

check first if you are "root" user
Code: [Select]

ls -l / |grep etc
and
ls -l /etc |grep passwd

if both are showing user and group ownership as root then u are fine.

Offline gauravbajaj

  • LST CareTaker
  • Experienced
  • *****
  • Posts: 658
adduser problem -- unable to lock passwd file
« Reply #2 on: May 20, 2005, 03:37:17 AM »
Dear
I have checked that files already there is nothing to do with this.., The files have the owner as well as group root.....


Then what others pb it is...., as i have checked many sites....it's written alll the lines u told , i have checked all, means ownership as well as process id.....

It is written that ... there is a file named passwd.lock , just check the pid of that file...

Kill that pid..
but this is also not the pb in my case...

SO plzz help me what i can do???



Gaurav

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
adduser problem -- unable to lock passwd file
« Reply #3 on: May 20, 2005, 11:07:26 AM »
:?
hmm...

You know I was also wondering that why you have asked such question and was sure that we will have to shake our brain.

Ok now I think you should give a filesystem repair then see if you still facing the problem.

Offline gauravbajaj

  • LST CareTaker
  • Experienced
  • *****
  • Posts: 658
adduser problem -- unable to lock passwd file
« Reply #4 on: May 21, 2005, 07:27:08 AM »
OK Ricky
I will perorm filesystem repair , if   it doesn't work .. then  i will ask u ...

Thxxxxxxxxxxxx
Gaurav