Re: Restoring users
On 4/29/05, Laurent CARON <lcaron@apartia.fr> wrote:
> Alexander Toresson a écrit :
>
> >On 4/29/05, Laurent CARON <lcaron@apartia.fr> wrote:
> >
> >
> >>Alexander Toresson a écrit :
> >>
> >>
> >>
> >>>On 4/29/05, Laurent CARON <lcaron@apartia.fr> wrote:
> >>>
> >>>
> >>>
> >>>
> >>>>Alexander Toresson a écrit :
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>>I got a tip from a linux security freak that to increase the security
> >>>>>of my box, I should delete all unnessecary users and groups. I did
> >>>>>that, however, I seem to have deleted a little too much.
> >>>>>
> >>>>>exim4-config complains that user uucp does not exist and thus doesn't
> >>>>>configure itself, and this makes bunch of other packages not configure
> >>>>>themselves.
> >>>>>
> >>>>>I've tried using adduser --system to add it again, but it gives this
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>error:
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>>useradd: unable to open password file
> >>>>>adduser: `/usr/sbin/useradd -d /home/uucp -g nogroup -s /bin/false -u
> >>>>>106 uucp' returned error code 1. Aborting.
> >>>>>
> >>>>>I've doing tried doing dpkg-reconfigure base-passwd, but that gives
> >>>>>the following output:
> >>>>>
> >>>>>update-passwd has found some differences between your system accounts
> >>>>>and the current Debian defaults. It is advisable to allow
> update-passwd
> >>>>>to change your system; without those changes some packages might not
> >>>>>
> >>>>>
> >>work
> >>
> >>
> >>>>>correctly. For more documentation on the Debian account policies
> please
> >>>>>see /usr/share/doc/base-passwd/README.
> >>>>>
> >>>>>The list of proposed changes is:
> >>>>>
> >>>>>Adding group "uucp" (10)
> >>>>>Adding group "proxy" (13)
> >>>>>Adding group "fax" (21)
> >>>>>Adding group "tape" (26)
> >>>>>Adding group "dip" (30)
> >>>>>Adding group "operator" (37)
> >>>>>Adding user "sync" (4)
> >>>>>Adding user "uucp" (10)
> >>>>>Adding user "proxy" (13)
> >>>>>Adding user "nobody" (65534)
> >>>>>Would commit 10 changes
> >>>>>
> >>>>>It is highly recommended that you allow update-passwd to make these
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>changes
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>>(a backup file of modified files is made with the extension .org so
> you
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>can
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>>always restore the current settings).
> >>>>>
> >>>>>May I update your system? [Y/n] Y
> >>>>>Okay, I am going to make the necessary updates now
> >>>>>Adding group "uucp" (10)
> >>>>>Adding group "proxy" (13)
> >>>>>Adding group "fax" (21)
> >>>>>Adding group "tape" (26)
> >>>>>Adding group "dip" (30)
> >>>>>Adding group "operator" (37)
> >>>>>Adding user "sync" (4)
> >>>>>Adding user "uucp" (10)
> >>>>>Adding user "proxy" (13)
> >>>>>Adding user "nobody" (65534)
> >>>>>10 changes have been made, rewriting files
> >>>>>Writing passwd-file to /etc/passwd
> >>>>>Error making backupfile /etc/passwd.org: Operation not permitted
> >>>>>
> >>>>>How can it not have access to write to that file? I run as root!
> >>>>>
> >>>>>Regards, Alexander Toresson
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>error on FS
> >>>>
> >>>>FS mounted read only
> >>>>
> >>>>....?
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>Nope, it's read write. And fsck reports no errors. And I can create
> >>>easily create that file myself without any problem. And I don't get
> >>>anything written in syslog/klog.
> >>>
> >>>Regards, Alexander Toresson
> >>>
> >>>
> >>>
> >>>
> >>>
> >>are you able to write in /etc/passwd and /etc/passwd.org ??
> >>
> >>
> >>
> >
> >Hmmm... I'm able to write to /etc/passwd.org, but not to /etc/passwd.
> >That's strange.
> >
> ># ls -al /etc/passwd
> >-rw-r--r-- 1 root root 946 2005-04-08 23:19 /etc/passwd
> >
> >I have no idea why I can't write to it. Maybe a program is locking the
> >file, but I dunno how to check that.
> >
> >
> >
> lsattr /etc/passwd ?
>
I'm dumb. That security freak also suggested that you made important
files immutable. I had forgotten that I did that. I just did chattr -i
on a few files, and now it works like a charm. Anyway, thank you for
taking your time and responding so fast! The average reply time from
you was just 6 minutes.
Regards, Alexander Toresson
Reply to: