Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
problem with useradd: Cannot lock /etc/group ; try again lat
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
zacinfinite
Tux's lil' helper
Tux's lil' helper


Joined: 18 Apr 2011
Posts: 90

PostPosted: Mon Apr 25, 2011 10:42 am    Post subject: problem with useradd: Cannot lock /etc/group ; try again lat Reply with quote

i want to add a user
i just typed useradd xyz, and i got:-
useradd: cannot lock /etc/group; try again later.

what the heck?
Back to top
View user's profile Send private message
nemectic
Apprentice
Apprentice


Joined: 20 Aug 2004
Posts: 182

PostPosted: Mon Apr 25, 2011 4:35 pm    Post subject: Reply with quote

Sounds like the file is in use by something? Probably the simplest, but definitely not the most efficient method - it should work after a reboot.

Alternatively, check you don't have it open in any of your terminals/editors - Though I'm guessing if you have that file open by hand you SHOULD know this.
Code:
ps -A


Check what's running at the moment, if there are any editors hanging, kill them. Anything outside of that, I'd be looking at security issues.
Back to top
View user's profile Send private message
zacinfinite
Tux's lil' helper
Tux's lil' helper


Joined: 18 Apr 2011
Posts: 90

PostPosted: Tue Apr 26, 2011 12:33 pm    Post subject: Remove the Lock File And Problem Solved Reply with quote

Hey I got It!
linux creates a file called filename.lock
eg: /etc/group.lock
this file is created when u try to edit same file at the same time by different methods.

SIMPLY REMOVE THAT LOCK FILE and Problem solved
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum