You are not logged in.
Hello!
Today pacman told me, that it created /etc/group.pacnew and /etc/gshadow.pacnew, because my version differs (of course, maintainer can't know my username and my own groups...) from the new ones. Upgrading config files is normally not a problem, but this two files are "dangerous". What the best way to handle it?
I wonder if their is anywhere a general guide for upgrading this two files?
Hoschi
Offline
1. Make a copy of your files (backup).
2. Compare your version with *.pacnew versions (e.g. vimdiff)
3. Inspect difference line by line to see what has changed.
4. Apply changes manually.
You will notice some groups have been removed added, so it will be quick & easy this time.
EDIT: Fixed my answer.
Last edited by mloskot (2012-06-24 13:48:24)
Mateusz Loskot | github | archlinux-config
Arch (x86-64) | ThinkPad T400 | Intel P8600| Intel i915
Arch (x86-64) | ThinkPad W700 | Intel T9600 | NVIDIA Quadro FX 2700M
Offline
lock was all that seemed new to me.
There may be some groups in your current files that are absent in the pacnews, these would be groups that either you have added yourself, or have been added by other packages. I had a couple of these - ntp is one example. You almost certainly want to keep these, unless they were added for some service that you have subsequently removed.
Last edited by Trilby (2012-06-24 13:47:37)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Removed? No, we only added the 'lock' group.
Yes, you are right. I missed the fact that I have some additional groups added by packages I installed (e.g. mysql), so the updated group.pacnew does not include them.
Last edited by mloskot (2012-06-24 13:48:56)
Mateusz Loskot | github | archlinux-config
Arch (x86-64) | ThinkPad T400 | Intel P8600| Intel i915
Arch (x86-64) | ThinkPad W700 | Intel T9600 | NVIDIA Quadro FX 2700M
Offline
I had quite a few removed (~5), lock was certainly added though.
Edit: @mloskot -- I forgot about that, probably a good job I didnt bother merge, I'd have most likely been stupid and left stuff.
Last edited by Psykorgasm (2012-06-24 13:49:41)
Offline
1.
In the new group file, lock was written like this:
lock:x:54:
But in gshadow it looks like this:
lock:::
I wonder why there is the "x" in group but none in gshadow.
Both files should be consistent.
2.
Also some applications use "!" instead of "x", when they add entries to the files.
Today i learned both signs have the same effect.
Offline
Wait, after I updated and checked my groups folder I already had a line that said "lock" in the original group file, and same goes for gshadow... I'm a little confused, why would I have it already?
Offline
@SolarBoyMatt
See #4 for the reason why you already may have these lines
On my behalf I too wonder about what teateawhy points out in his first statement after reading it.
Also, on the basis of Trilby's reply, the groups that are added by other packages are they removed or do they stay when these are removed too? To some extent, again on the basis of Trilby's message, I understand that they stay but I prefer to be sure.
\(o_X)/
'Cause I wanna be an Archy - An Archy in the UK // Sex Pistols
Offline
Thanks for your help. I will manually merge the new group into the both files!
Offline
Well, I did merge what was missing, which was the lock entry, however it seems something else had already added it and at least in gshadow it differs, for a group that is supposed to be present in the files provided by filesystem it seems to be a bad to have some other package adding and later trying to remove this group.
> grpck -r
duplicate group entry
delete line 'lock:x:54:'? No
duplicate group entry
delete line 'lock:x:54:'? No
duplicate shadow group entry
delete line 'lock:::'? No
duplicate shadow group entry
delete line 'lock:!::'? No
grpck: no changes
Last edited by R00KIE (2012-06-26 18:48:19)
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
You can also use merge_pacnew_group and merge_pacnew_gshadow in the pacnew_scripts package.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Thanks, Xyne. This looks useful. I will also be checking out maown which you highlighted in another thread.
Offline
Can I just merge the group file and the use grpconv to generate a gshadow file?
Offline
Can I just merge the group file and the use grpconv to generate a gshadow file?
It is always safer to use grpck first.
All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.
Offline
Can I just merge the group file and the use grpconv to generate a gshadow file?
You shouldn't touch group/gshadow. Just look at filesystem.install and you'll see that the lock group will be created for you. Simply erase g{roup,shadow}.pacnew.
Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd
Offline