LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-29-2010, 04:16 PM   #1
apt-get
Member
 
Registered: Dec 2010
Distribution: Debian Squeeze (Console Only)
Posts: 79

Rep: Reputation: 7
"adduser" keeps failing on me


Grr. Just installed Slack, can't get adduser to work. I go through all the steps and it just spits:

Code:
 
useradd: cannot lock /etc/passwd; try again later.
- Error running useradd command -- account not created!
(cmd: /usr/sbin/useradd -d /home/jack -m   -g users -G audio,cdrom,floppy,plugdev,video,power,netdev -s /bin/bash jack)
Please help? I don't feel like being stuck as root forever :/
 
Old 12-29-2010, 04:37 PM   #2
thegeek
Member
 
Registered: Oct 2009
Location: Amsterdam
Distribution: CentOS,Fedora,Puppy
Posts: 62

Rep: Reputation: 20
use the command sudo lsof /etc/passwd to find out which processes are using the password file...

LSOF is a list of open files ...
 
Old 12-29-2010, 05:01 PM   #3
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,044

Rep: Reputation: 150Reputation: 150
Quote:
Originally Posted by apt-get View Post
Grr. Just installed Slack, can't get adduser to work. I go through all the steps and it just spits:

Code:
 
useradd: cannot lock /etc/passwd; try again later.
- Error running useradd command -- account not created!
(cmd: /usr/sbin/useradd -d /home/jack -m   -g users -G audio,cdrom,floppy,plugdev,video,power,netdev -s /bin/bash jack)
Please help? I don't feel like being stuck as root forever :/
Tried to run adduser as a normal user. Got the same error.

Last edited by guanx; 12-29-2010 at 05:03 PM.
 
Old 12-29-2010, 06:03 PM   #4
apt-get
Member
 
Registered: Dec 2010
Distribution: Debian Squeeze (Console Only)
Posts: 79

Original Poster
Rep: Reputation: 7
I'm logged in as root though. And lsof didn't give me any output.

EDIT: I just tried to run netconfig too and it told me that i have a read-only filesystem...?
 
Old 12-29-2010, 07:00 PM   #5
apt-get
Member
 
Registered: Dec 2010
Distribution: Debian Squeeze (Console Only)
Posts: 79

Original Poster
Rep: Reputation: 7
Sorry for the double post, but I just noticed something else...it says I'm logged in as:

root@(none):/#

None? I named the computer Slackware-PC1 :P
 
Old 12-29-2010, 07:20 PM   #6
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 3,825

Rep: Reputation: 1101Reputation: 1101Reputation: 1101Reputation: 1101Reputation: 1101Reputation: 1101Reputation: 1101Reputation: 1101Reputation: 1101
try running netconfig
 
Old 12-29-2010, 07:37 PM   #7
apt-get
Member
 
Registered: Dec 2010
Distribution: Debian Squeeze (Console Only)
Posts: 79

Original Poster
Rep: Reputation: 7
Quote:
Originally Posted by willysr View Post
try running netconfig
I did It gave me:

/sbin/netconfig: line 269: cannot create temp file for here-document: Read-only file system
cat: /var/log/setup/tmp/SeThost: Read-only file system
/sbin/netconfig: line 275: /var/log/setup/tmp/SeThost: Read-only file system
 
Old 12-30-2010, 02:25 AM   #8
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,890

Rep: Reputation: 569Reputation: 569Reputation: 569Reputation: 569Reputation: 569Reputation: 569
You have some problem with your filesystem, as your root partition is not being re-mounted 'rw' during bootup. Try booting with the install CD and run fdisk on your root '/' partition.
 
Old 12-30-2010, 07:37 AM   #9
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 682

Rep: Reputation: 105Reputation: 105
fdisk!?!?!?

It does sound like a filesystem issue; for some reason it is not being remounted rw, I go with you on that Gnash; but I doubt you could fix that with fdisk; I'd rather run fsck (FileSystemChecK)

I'd go in this order:
Run "mount" without parameters; expecting:
/dev/root on / type ext4 (rw,relatime,barrier=1,data=ordered)
... other filesystems (rw)

- But in your case I think /dev/root has "ro" instead of "rw".

next to check if your /dev/root is indeed the /dev/root you'd expect (sda1 or so):
ls -l /dev/root
lrwxrwxrwx 1 root root <date time> /dev/root -> sda1

See if there are any messages in dmesg about your filesystem, probably why it could not mount rw:
dmesg | grep sda

EDIT: remounting happens in /etc/rc.d/rc.S, is that file exectutable or even there? (would cause some mess like this if it's not)
-> you can try to manually run the remount and see if there's a filesystem error preventing you to remount rw:
Code:
/sbin/mount -w -v -n -o remount /
(code graciously stolen from rc.S)

if all is correct or as expected , perform an fsck. The preferred method of performing an fsck is by booting with tha cd/dvd:
log in and perform your fsck:
fsck /dev/sda1

NB: sda1 is the partition that contains the root filesystem, it may be different in your case (not quite common though).

Last edited by Ramurd; 12-30-2010 at 07:43 AM. Reason: rc.S stuff
 
Old 12-30-2010, 10:33 AM   #10
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,890

Rep: Reputation: 569Reputation: 569Reputation: 569Reputation: 569Reputation: 569Reputation: 569
Yes, of course I meant fsck and not fdisk! I was a bit sidetracked...
 
Old 12-31-2010, 01:47 PM   #11
tallship
Member
 
Registered: Jul 2003
Location: On the Beaches of Super Sunny Southern San Clemente, California USA
Distribution: Slackware - duh!
Posts: 534
Blog Entries: 3

Rep: Reputation: 118Reputation: 118
Quote:
Originally Posted by gnashley View Post
Yes, of course I meant fsck and not fdisk! I was a bit sidetracked...
and perhaps...

Code:
# cat /etc/fstab
...
# cat /etc/mtab
for quick status.
 
  


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
[SOLVED] mount.cifs failing with "Required key not available" error luvshines Fedora 3 12-13-2011 01:48 AM
usb serial driver failing when calling "usb_submit_urb" - why? DEF. Programming 3 05-28-2009 10:25 AM
After "adduser user scanner", how to restart the permissions without rebooting? frenchn00b Linux - General 3 12-31-2008 02:58 AM
Try to use "Adduser or useradd" marshgeo@uga.edu Linux - General 1 03-14-2007 09:20 AM
"adduser" not adding users to default group "users" PunkPT Slackware 2 09-23-2004 11:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:34 AM.

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