Find the answer to your Linux question:
Results 1 to 5 of 5
I did an etc-update after portage told me that there were some files that needed updating. I saw that it update /etc/passwd, groups, shadow now when i do whoami i ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Sep 2003
    Location
    St.Charles, Missouri, USA
    Posts
    201

    etc-update wreaks havic [solved]


    I did an etc-update after portage told me that there were some files that needed updating. I saw that it update /etc/passwd, groups, shadow now when i do whoami i get:
    Code:
    whoami: cannot find username for UID 100
    and my terms. look like this:
    Code:
    I have no name!@gwalters ~ $
    and 'top' only shows UID's not usernames. mplayer doesnt work anymore and says:
    Code:
    could not get user name from user id
    How can I fix all this?

    FIX: It turns out that etc-update changed my etc/passwd and group files. I restored the originals but still had the problem. Turns out that the files were chmod -r-------- root root. I changed them to -r--r--r-- root root. allowing everyone to read them. Now all UID's can be resolved to usernames
    Powered by Gentoo
    never ever ever use the hardened option in make.conf!

  2. #2
    Just Joined! chammer's Avatar
    Join Date
    Oct 2004
    Location
    Hampton, VA, USA
    Posts
    14
    hopefully you keep a backup of your important files like this. if so just restore from backup. if not, im sorry but you will have to try and recreate them.

    etc-update isnt the best way to update your files, and i hope this teaches you that. also should teach you that backups are essential, if you dont already backup. a nightly cron to do /etc /home /var would be your best back. look into flexbackup once you get everything straight (emerge -s flexbackup). i use it on several machines and its quite nice.

    find /etc -iname '._*'

    will show you what new config files are. you can then step through them one by one and figure out what you want to copy over, and what you wish to delete. its can be a bit time consuming at times, but you also wont have a script over writing your changes.

  3. #3
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Location
    /dev/urandom
    Posts
    3,682
    What I do (as I haven't set up dispatch-conf yet) is etc-update to view the files. Then I'll -1 to exit and remove the ._cfgs that I don't want to overwrite my files.

    Unfortunately, there's no way to get back what was lost. Check out dispatch-conf. It basically does etc-update's job with a little version control.
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

  4. #4
    Linux Engineer
    Join Date
    Jul 2003
    Location
    Stockholm, Sweden
    Posts
    1,296
    if you were reasonably sane when performing etc-update then in changed the origional files to backup files simple restore these files. then read the manpage :)

  5. #5
    Linux Engineer
    Join Date
    Jul 2003
    Location
    Stockholm, Sweden
    Posts
    1,296
    note: etc-update is pretty good nowadays and rarely needs to update any files.. i installed on a box a few weeks ago and have had to run it only once and it only automerged one file :)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •