[SOLVED] Today's update of /etc/group, /etc/passwd and /etc/gshadow

Hello,
During the regular updates I received an update of /etc/groups. I wonder what I should do here, as there are some differences between the old file and the pacnew one. I suppose that when I use the command to add my user to a group, it gets written into this file. So, just recklessly moving the pacnew file in the place of the old one, will mess up all my groups, won't it?
Then what should I do? All the entries in the pacnew file are also present in the old one, so I guess I could just delete the pacnew one and keep the old one. Am I right?
EDIT: The same goes to /etc/passwd and /etc/gshadow.
Last edited by Unia (2012-10-06 09:51:23)

teateawhy wrote:
If you had the uuid user before like me the uuid line in your own files is different from the pacnew file. You have to delete the uuid line near the bottom in your old file. Then insert the new uuid entry including the new number in the place near the top suggested by the pacnew file. Keep the other lines untouched, then save your changes and delete the pacnew files.
Edit: On a system that has actually been modified from a default install the new files will for sure be different to the old ones.
Thanks, teateawhy!  I currently have this listed in /etc/passwd:
uuidd:x:998:998::/:/sbin/nologin
And this is in the .pacnew file:
uuidd:x:68:68:uuidd:/:/sbin/nologin
So, I can just copy the entry from the .pacnew file, overwriting the old entry, right?
What I don't understand is how the two numbers 998 representing the UID and GID can suddenly change to 68.  Shouldn't they have to correspond with some other reference or list of users/groups...?
I'm sure it's fine to just replace the entry as you suggested, but I wondered if there was a way to double-check which uid/gid should be used?  It's not that I don't trust you, but I don't fully understand how these group/passwd files work and I'm trying to get my head round it all.
Cheers,
esuhl

Similar Messages

  • [SOLVED] /etc/passwd and /etc/shadow -- pwck shows missing groups

    I recently found out about the pwck and grpck commands to check for errors/inconsistencies in the passwd, group, shadow and gshadow files...  grpck returns no errors, but pwck returns this:
    user 'avahi': no group 84
    user 'postgres': no group 88
    user 'ntp': no group 87
    pwck: no changes
    These are the relevant lines from /etc/passwd:
    avahi:x:84:84:Avahi daemon:/:/bin/false
    postgres:x:88:88:PostgreSQL user:/var/lib/postgres:/bin/bash
    ntp:x:87:87:Network Time Protocol:/var/lib/ntp:/bin/false
    There are lines for those users in /etc/shadow... but...  I'm not sure what I need to do to fix the problem.
    I think I understand enough, now, to maintain the files in future, but would anyone know I can fix this?
    Last edited by esuhl (2012-10-08 20:22:05)

    2ManyDogs wrote:I don't know how to fix the errors, but I'm really curious about why you decided to run those commands. Were you having a problem you thought might be ralated to groups and/or passwords? What are groups 84, 97, and 88?
    Ha!  Well... when I started using Arch I really didn't know much about Linux and I an update providing some .pacnew files (/etc/group, gshadow, passwd, shadow) and... well...  I don't know what I did, but I think it was probably not what I should have done(!).  I used grpck in the past and got no errors and it suddenly occurred to me today that there should be an equivalent for checking /etc/passwd... so that's why I just ran the commands now.  Everything seems to be working, however...
    I don't have an entry for groups 84, 87 and 88 in my /etc/group file...  Hmmm...
    I tried running this command to find any files associated with that group, but only get the following:
    [root@i7pc tim]# find / -gid 88
    find: `/run/user/1000/gvfs': Permission denied
    find: `/proc/1806/task/1806/fd/5': No such file or directory
    find: `/proc/1806/task/1806/fdinfo/5': No such file or directory
    find: `/proc/1806/fd/5': No such file or directory
    find: `/proc/1806/fdinfo/5': No such file or directory
    I get similar output for the other groups, so... can I just delete them from /etc/passwd and /etc/shadow?
    I notice I have the avahi package installed, however, and group 84 relates to user 'avahi'... so...  surely I need the avahi user...?
    Last edited by esuhl (2012-10-07 23:09:30)

  • Hi...my last updating software was with 4.2.1 and today I updated new software 4.3.5 and im not happy with more strong vibration ,Can apple consider it  and restore the previous settings of vibration.Thank you

    Hi...my last updating software was with 4.2.1 and today I updated new software 4.3.5 and im not happy with more strong vibration ,Can apple consider it  and restore the previous settings of vibration.Thank you

    Apple isn't here.
    This is a user to user forum.
    Allan

  • Login Process & Security of /etc/passwd and /etc/shadow

    Guys,
    I have few questions, Please help me out.
    1. What is the Solaris 8 and Solaris 9 environment's boot files ?
    2. While Logging into Solaris Operating Environment , which is file is responsible for Login Process ? Through which file/command the username and password is cross checked with /etc/passwd and /etc/shadow ?
    3. We all know that /etc/passwd come with -rw-r--r-- permission and /etc/shadow comes with -r--------. I did a chmod and assigned 000 to both the files. But Still I am able to change the password for the normal user. And as a root I am still able to cat the contents of both the files.
    Help me understand these concepts.
    Thank you.
    Arut

    Sounds like you're very new to Solaris:
    1. What is the Solaris 8 and Solaris 9 environment's boot files ?/kernel/genunix is the primary boot file. The directory structure in /kernel is also boot related. /usr/kernel is also boot related.
    2. While Logging into Solaris Operating Environment , which is file is responsible for Login Process ? Through which file/command the username and password is cross checked with /etc/passwd and /etc/shadow ?Generally three files are related: /etc/passwd, /etc/shadow, and the program /bin/login. Some applications will process /etc/passwd and /etc/shadow on their own and bypass /bin/login - but for you're purposes this is a good general answer.
    As a minor example (and if I remember correctly), say someone uses telnet to log into a system. Telnet prompts for the login ID. Once input, it passes forks off /bin/login with the login ID. /bin/login reads the user password information from /etc/shadow and takes the first two bytes from the password field (column 2 using : as field seperator) which is the crypt salt (see crypt man page). /bin/login prompts for the password which the user inputs. /bin/login takes the user input password and the salt value read from /etc/shadow for that user and pushes it through crypt. It then takes the resultant crypt output and compares it against what it read from /etc/shadow - if they matches the user has input the right password. If not, it prompts the user again with a password prompt.
    3. We all know that /etc/passwd come with -rw-r--r-- permission and /etc/shadow comes with -r--------. I did a chmod and assigned 000 to both the files. But Still I am able to change the password for the normal user. And as a root I am still able to cat the contents of both the files.To change your password you run the passwd command. That command is SUID root - so for a short period of time you become root within the context of that process. Root is basically god mode and doesn't care about file access priviledges generally. So that fact that /etc/passwd and /etc/shadow have 000 file access permissions doesn't matter - root can still read and write to them.

  • How to recover /etc/passwd and /etc/shadow files

    hi
    Unfortunetly I have a big problem is that someone crash the /etc/passwd and /etc/shadow files from my running server, and my all users are not to able to login. so please can any one help me how to recover this files or any ideas for make these files...
    thanks
    Mohammed Tanvir

    Hello
    It is not working.Pla help me this bit critical
    Step followed
    01.Boot from the cdrom and mount root partision.
    02.Deleted the exsisting file /etc/passwd and /etc/shadow
    03.copy the opasswd and oshadow to the etc directory as passwd and shadow
    04.Umount the root partision
    05.Reeboot the system
    thanks
    Roshantha

  • Environment variables /etc/skel/local.profile and /etc/skel/.profile

    Hi
    I have a problem to provide the working environment for ALL THE USERS :/ with all the files in this directory:
    */etc/skel/*
    In Oracle Documentation says: You can use these files ( */etc/skel/local.profile* ) as a starting point and then modify them to create a standard set of files
    that provide the work environment common to all users. Defines the user's environment at login.
    I edit the file */etc/skel/.profile* for put the JAVA_HOME variable for all the users of this way
    nano /etc/skel/.profile
    export JAVA_HOME=/usr/bin/java *#I added this variable*
    export PATH=/usr/bin:/usr/sbin
    if [ -f /usr/bin/less ]; then
    export PAGER="/usr/bin/less -ins"
    elif [ -f /usr/bin/more ]; then
    export PAGER="/usr/bin/more -s"
    fi
    case ${SHELL} in
    *bash)
    typeset +x PS1="\u@\h:\w\\$ "
    esac
    Later I check the parameters to add the user
    useradd -D
    group=staff,10 project=default,3 basedir=/export/home
    skel=/etc/skel shell=/usr/bin/bash inactive=0
    expire= auths= profiles= roles= limitpriv=
    defaultpriv= lock_after_retries=
    adduser -m testuser
    passwd testuser
    I log on as testuser and check if the variable JAVA_HOME is available, but no.
    Why it can not see that variable as available? THAN YOU FOR YOUR HELP

    Try local.profile instead of .profile
    If there is one already there then rename it first.
    alan

  • Migration form /etc/passwd and /etc/shadow to iPlanet Directory !

    Hi,
    we try to migrate from files (shadow passwd on Solaris) to LDAP- Server from iPlanet. So far so good. Our problem is now to migrate users, which have no password (NP in shadow) or users with an locked account (*LK* in shadow). Is there an attribute or flag, e.g. in the class shadowaccout which describes this issue.

    Hi Alois,
    I assume that your question is about preventing locked or no-password users from logging into the directory.
    The easiest would be to inactivate both no-password and locked users. I would
    1) create one role for both no-password and locked users, then
    2) assign the corresponding role to each user who is either locked or has no password
    3) inactivate both roles.
    By inactivating a role, all users possessing that particular role become inactivated. Inactivated users can not login to the directory.
    I would recommend you to read the 'Advanced Entry Management' chapter of the administrator's guide.
    I hope this helps.
    Bertold

  • [SOLVED] sudo: unable to set runas group vector: Invalid argument

    I recently made the (idiotic) mistake of overwriting my /etc/passwd and /etc/group files, although I managed to restore them from a backup.  Since restarting the machine I'm having the same issue every time I invoke sudo:
    sudo: unable to set runas group vector: Invalid argument
    I can't find any info on this error. Any ideas on where to start?
    Thanks,
    -- C. M.
    EDIT: I should also note that this is a headless machine that I'm accessing via SSH.
    Last edited by C. M. Harlequin (2014-06-15 10:35:33)

    Thanks for the reply, Amish.
    It's my understanding that the 'group vector' is a term that refers to the specific set of groups to which a user has membership, rather than a specific group named 'vector'.  Although, I could be mistaken.
    From the sudo manpage:
    The -P (preserve group vector) option causes sudo to preserve the user's group vector unaltered. By default, sudo will initialize the group vector to the list of groups the target user is in. The real and effective group IDs, however, are still set to match the target user.
    Similarly, from the sudoers manpage:
    By default, sudo will initialize the group vector to the list of groups the target user is in. When preserve_groups is set, the user's existing group vector is left unaltered. The real and effective group IDs, however, are still set to match the target user. This flag is off by default.
    But the manpages don't offer me much, I'm still clueless as to why I'm getting the error.
    EDIT: although using the -P flag seems to allow sudo to run without error
    Last edited by C. M. Harlequin (2014-06-14 18:42:39)

  • User and Group IDs.. and where are these recorded?

    I come from a Unix background, so I'm having a little trouble getting my head around this. /etc/passwd and /etc/group are apparently not used for normal user accounts in OSX. Is there a way to change the UID and GID of a user account?
    The reason I'm asking is because the Mac version of Guitar Pro installs as UID and GID 501 and, on my Mac, it crashes about halfway through playing a song with:
    Exception: EXCBADACCESS (0x0001)
    Codes: KERNINVALIDADDRESS (0x0001) at 0x061f9f18
    ... and I suspect the problem is file permission related, as my main user account is UID/GID 502, and 501 does not relate to any existing user account on the system (I deleted my original account shortly after getting my Mac and created a new account for myself) .

    UIDs and GIDs are managed with /Applications/Utilities/Netinfo Manager. Since you claim to have a unix background, you probably don't need to be told to not mess with any of its settings unless you know what you are doing.

  • I have updated my Ipad 2 to ios5 and now don't have a calendar on my ipad but the calendar is still ok on my iphone and imac

    Today I updated my iPad 2 to IOS5 and now I don't have a calendar on my iPad but it is still on my iPhone and iMac.  Can anyone help me please?

    Hey there johnnyb141,
    It sounds like you are are connected to your cellular network but cannot get cellular data to work when trying to surf the internet with Safari. First I would check in the Settings to see if Cellular data is enabled, or if Safari is disabled in the Cellular settings:
    For the following options, go to Settings > Cellular Data and turn the options on or off, or follow the onscreen instructions.
    Turn Cellular Data on or off. If Cellular Data is off, all data services will use only Wi-Fi—including email, web browsing, push notifications, and other services. If Cellular Data is on, carrier charges may be incurred. For example, using certain features and services that transfer data, such as Messages, could result in charges to your data plan.
    From: iPhone User Guide
              http://help.apple.com/ipad/7/#/iPadbfe780eb
    If it is turned on, and Safari is enabled, I would next try the troubleshooting in this article:
    iPad (Wi-Fi + Cellular Models): Troubleshooting a cellular data connection
    http://support.apple.com/kb/TS4249
    Thank you for using Apple Support Communities.
    Take care,
    Sterling

  • [SOLVED] /etc/group or /etc/gshadow are inconsistent, grpck shows " ".

    After updating, pacman said
    ==> Warning: /etc/group or /etc/gshadow are inconsistent.
    but when running grpck there was no output.
    I would guess this means everything is OK. Is this the case?
    In case it matters, these are my /etc/group and /etc/gshadow.
    Last edited by trusktr (2013-09-06 07:46:30)

    Check these:
    https://bbs.archlinux.org/viewtopic.php?id=131484
    https://bbs.archlinux.org/viewtopic.php?pid=1064456

  • [Solved] Questions about /etc/group and /etc/gshadow

    This morning, package filesystem was upgraded to 2015.02-1 and pacnew files were created for /etc/group and /etc/gshadow. I ran diff against my current files, and the differences seem very minor, to me. I need some guidance to understand whether I should implement the pacnew changes.
    The only significant difference I see in the group file is that in my original version, my username is added to the wheel group. This seems correct, to me.
    For gshadow, there is the same difference for wheel. However, there are several entries where my original entry contains an exclamation point, but the new version does not. For example:
    < proc:!::
    > proc:::
    If I run man /etc/gshadow, it does not give me what I understand as a man page, and gives me what appears to be a listing of the stuff in my /etc/gshadow file, instead. Which does not help me.
    So, like I say, I need some guidance on dealing with these pacnew files.
    Tim
    PS - I now see that "man gshadow" gives me an actual man page. Sorry. I am currently studying it.
    Last edited by ratcheer (2015-02-24 21:37:52)

    After the update to filesystem 2015.02-1 some voices in /etc/gshadow were changed (in the pacnew file) from
    systemd-journal-gateway:!::
    systemd-timesync:!::
    systemd-network:!::
    systemd-bus-proxy:!::
    systemd-resolve:!::
    to
    systemd-journal-gateway:::
    systemd-timesync:::
    systemd-network:::
    systemd-bus-proxy:::
    systemd-resolve:::
    What's the change? Before they had a locked password (the ! sign) and now they haven't?

  • [SOLVED] Files in /etc with a dash after them (e.g. /etc/group-)

    Hi,
    What are the files in /etc with a dash after them? For example, I have:
    /etc/group
    /etc/group-
    /etc/gshadow
    /etc/gshadow-
    /etc/shadow
    /etc/shadow-
    What are the dashed versions for? Do I need to keep them?
    Last edited by jwhendy (2010-10-25 21:47:13)

    AFAIK, they are a backup of the previous copy of the file (eg, passwd- is what passwd was before the last change). They are kept because they are such important files. You can delete them, but backups are a "good thing"™.

  • Repaing Permissions = Group Differ on "private/etc/cups", should be 0, grou

    Repaing Permissions = Group Differ on "private/etc/cups", should be 0, groups is 26.
    It says this everytime, even when it was brand new...
    What does this mean? Whay doesn't it go away after repairing?

    This error message has been occurring since Mac OS X 10.5.4 I believe, it's not harmful in any way to the operation of your Mac, so I wouldn't worry about it. I'm sure Apple will have this fixed in a future update.

  • Group differs on "private/etc/cups", should be 0, group is 26.

    Greetings.
    After performing Verify Disk Permission, i have this massage:
    *Group differs on "private/etc/cups", should be 0, group is 26.*
    Immediately i performed Repair Disk Permission but in the end i still get this massage.
    Any idea what dose that means?
    Thank you so much.
    Cheers.

    ChrisWad wrote:
    How do you submit a bug to Apple as I want to put some weight behing this one.
    Chris
    Why? Who says it's a bug worth worrying about?
    Ever since Repair Permissions was introduced (around 10.1.5 I seem to remember, although it was 10.2 before it was integrated into Disk Utility) there have been occurrences of these "spurious" errors.
    Take a look at these:
    Spurious Permissions errors in 10.2
    Spurious Permission errors in OS X 10.3
    Spurious Permission errors in OS X 10.4
    Some of these disappeared with point updates, others didn't. They did not prevent anyone's system working. They were acknowledged as unimportant in this article: Disk Utility reports some messages that you can ignore when checking permissions.
    I didn't write an equivalent for 10.5, because there were so many ACL and SUID errors which changed with each version, see Mac OS X 10.5: Disk Utility's Repair Disk Permissions reports issues with SUID files.
    This particular message is of no consequence. It may or may not disappear with the next system update. But if it bothers you, the answer is simple: stop Repairing Permissions!

Maybe you are looking for

  • Getting error -21 all of a sudden and unable to open a video chat

    Here's my issue, new 24" imac behind a Netgear Router using a fixed (reserved) IP from the dhcp. After opening all the ports that were needed by iChat AV I was happily video conferencing with others for a few weeks. Yesterday, after conferencing with

  • Not working correctly

    The program should take all input at one time until they input 0 and output it at all at one time (exluding the 0) but my program just takes each user input and outputs it right away instead of waiting until the user inputs 0 and doing it all at once

  • Choosing an external hard drive for MacBook Pro video editing?

    This summer, I'll be taking an introductory video production/editing class, using Final Cut Express 4. I own a late 2009 MacBook Pro (2.26Ghz Core 2 Duo, 8GB RAM, FireWire 800, GeForce 9400M), which I'd like to use for editing at home, i.e. when I do

  • Apple TV and Samsung HDTV

    Is it worth buying an ATV when I have an ethernet and USB plug on the back of my Samsung tv? Really all I'd like to be able to do is watch things like iView (the ABC's "download if you missed it" application). I don't really want to pay for downloads

  • Will I lose all my settings if I have to restore my iPhone 4?

    I was updating my phone via a computer then wifi crashed now my iPhone 4 is stuck with a picture of a cable pointing towards the iTunes symbol. I connected it back to my computer hoping it would start updating again but it tells me I have to restore