Error adding User/Group during software install

Archived topics about LMDE 1 and LMDE 2
Locked
chrisuk

Error adding User/Group during software install

Post by chrisuk »

I don't post asking for help often, as it's just a matter of using Google to find answers. IME, nothing is new, it's happened before to someone else. But for this particular problem, I've found it's happened to lots of other users from Redhat to Debian to Ubuntu... but I've not found one resolution. There's even a thread here that was never solved.

So, LMDE 2 is running as it should - responsive, frugal memory usage, no hang ups, etc. But when trying to install software yesterday, I got the following error:

Code: Select all

Setting up vnstat (1.12-2) ...
useradd: failure while writing changes to /etc/passwd
adduser: `/usr/sbin/useradd -d /var/lib/vnstat -g vnstat -s /bin/false -u 117 vnstat' returned error code 1. Exiting.
dpkg: error processing package vnstat (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 vnstat
E: Sub-process /usr/bin/dpkg returned an error code (1)
I did get error code 10 originally.

So my first thought was to try to add a group to test groupadd was working as it should... so I typed the following:

sudo groupadd --system testw

And I get the following:

Code: Select all

groupadd: failure while writing changes to /etc/group
The last successful group added was by Virtualbox: vboxusers:x:128: is the last entry in /etc/group. Attributes and ownership of /etc/group seems fine. I've tried many fixes, none worked... any ideas?

Code: Select all

System:    Kernel: 3.16.0-4-amd64 x86_64 (64 bit) Desktop: MATE 1.16.1  Distro: LinuxMint 2 betsy 
Machine:   Mobo: SAMSUNG model: RV411/RV511/E3511/S3511/RV711
           Bios: Phoenix v: 03PA.M001.20110312.XW date: 03/12/2011
CPU:       Dual core Intel Core i3 M 380 (-HT-MCP-) clocked at 933 MHz
Graphics:  Card: NVIDIA GT218M [GeForce 315M]
           Display Server: X.Org 1.16.4 drivers: nouveau (unloaded: fbdev,vesa) Resolution: 1366x768@59.99hz
           GLX Renderer: Gallium 0.4 on NVA8 GLX Version: 3.0 Mesa 10.3.2
Network:   Card-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller driver: r8169
           Card-2: Broadcom BCM4313 802.11bgn Wireless Network Adapter driver: wl
Drives:    HDD Total Size: 250.1GB (5.1% used) 
Info:      Processes: 164 Uptime: 1:24 Memory: 673.3/5844.6MB Client: Shell (bash) inxi: 2.1.28 
Thanks
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
chrisuk

Re: Error adding User/Group during software install

Post by chrisuk »

Some more info, relevant file permissions:

Code: Select all

-rw-r--r--   1 root  root     1039 Mar  3 16:18 group
-rw-------   1 root  root     1039 Mar  3 16:18 group-
-rw-r--r--   1 root  root     1052 Mar  3 17:27 group+
-rw-r-----   1 root  root      865 Feb 22 13:52 gshadow
-rw-------   1 root  root      851 Feb 19 08:52 gshadow-

-rw-r--r--   1 root  root     2034 Feb 19 08:52 passwd
-rw-------   1 root  root     2034 Feb 19 08:52 passwd-
-rw-r--r--   1 root  root     2079 Mar  3 18:00 passwd+

chrisuk

Re: Error adding User/Group during software install

Post by chrisuk »

I started a thread a few days ago titled; "What am I missing?"; about switching to LMDE from Mint 18.1... I appear to have found the answer - limited number of people that understand the Distro ;)

Oh well... I tried... back to the main edition I guess.
chrisuk

Re: Error adding User/Group during software install

Post by chrisuk »

Not that anyone seems interested, I've rolled back to a few days earlier using Timeshift - problem solved.
Penn

Re: Error adding User/Group during software install

Post by Penn »

chrisuk wrote:I started a thread a few days ago titled; "What am I missing?"; about switching to LMDE from Mint 18.1... I appear to have found the answer - limited number of people that understand the Distro ;)

Oh well... I tried... back to the main edition I guess.
Well, yes it was acknowledged that LMDE isn't for beginners and this is an example. I know I usually do my best to find answers myself instead of asking. The result has been I don't get help when I do ask, possibly because my questions aren't simple enough but lack of support is is a Linux issue, not an LMDE issue. As far as that goes, even the issue you had here is a Linux issue since it apparently has existed in multiple distros. Thanks to friendlier environments like this forum Linux is more usable these days but more knowledgeable people willing to help is still needed throughout GNU/Linux.

Should I now feel bad for being one of the people to recommend LMDE to you?
chrisuk

Re: Error adding User/Group during software install

Post by chrisuk »

Penn wrote:
chrisuk wrote:I started a thread a few days ago titled; "What am I missing?"; about switching to LMDE from Mint 18.1... I appear to have found the answer - limited number of people that understand the Distro ;)

Oh well... I tried... back to the main edition I guess.
Well, yes it was acknowledged that LMDE isn't for beginners and this is an example. I know I usually do my best to find answers myself instead of asking. The result has been I don't get help when I do ask, possibly because my questions aren't simple enough but lack of support is is a Linux issue, not an LMDE issue. As far as that goes, even the issue you had here is a Linux issue since it apparently has existed in multiple distros. Thanks to friendlier environments like this forum Linux is more usable these days but more knowledgeable people willing to help is still needed throughout GNU/Linux.

Should I now feel bad for being one of the people to recommend LMDE to you?
No need to feel bad... I'm back using LDME anyway ;)

I've half-sorted the problem - I thought it was due to installing gnome-system-tools (there's an incompatibility with mate-system-tools and GTK 3; which begs the question; why include them in the base install in the first place? ), but now I'm thinking it's a problem with files remaining locked after install/uninstall. All that matters to me is, it's fixed... although I can break it again quite easily ;)
chrisuk

Re: Error adding User/Group during software install

Post by chrisuk »

OK, not many here interested in this, but I don't like unsolved mysteries, so I've been trying various things to eliminate other things... you know what I mean ;) Anyway, I've narrowed it down to one of two things... it's either Firefox or firejail. Quitting Firefox makes groupadd work as it should.

If I can be bothered, I'll eliminate one or the other tomorrow... I've neither the time nor the inclination ATM
chrisuk

Re: Error adding User/Group during software install

Post by chrisuk »

I've posted a full explanation in Tutorials, but for any lurker that was following this thread:

The problem was caused by the LMDE kernel version and firejail... see this, scroll down to Cannot install new software while Firejail is running.
Habitual

Re: Error adding User/Group during software install

Post by Habitual »

Top Shelf kung.fu there Chris.
chrisuk

Re: Error adding User/Group during software install

Post by chrisuk »

Habitual wrote:Top Shelf kung.fu there Chris.
Dumb luck and stubbornness got me there in the end ;)
User avatar
Fred Barclay
Level 12
Level 12
Posts: 4185
Joined: Sat Sep 13, 2014 11:12 am
Location: USA primarily

Re: Error adding User/Group during software install

Post by Fred Barclay »

Hmm... I've had similar problems on occasion and I've always thought it was UFW, so I've had to disable ufw, reboot, run dpkg --configure -a which would install the programme correctly, re-enable ufw, and then reboot again.
And all this time it's been firejail?!? :roll: :lol:
Image
"Once you can accept the universe as matter expanding into nothing that is something, wearing stripes with plaid comes easy."
- Albert Einstein
chrisuk

Re: Error adding User/Group during software install

Post by chrisuk »

Fred Barclay wrote:Hmm... I've had similar problems on occasion and I've always thought it was UFW, so I've had to disable ufw, reboot, run dpkg --configure -a which would install the programme correctly, re-enable ufw, and then reboot again.
And all this time it's been firejail?!? :roll: :lol:
One thing I'm good at is finding solutions using Google... but as I said in my OP, I couldn't find one solution. I found things that seemed to work for one user... and then they didn't. So you've not been alone with finding a solution to this bug, as it was pretty much a race condition (It would depend whether a program was running in a firejail sandbox at the same time).

Like I said; I was lucky and stubborn... nothing more ;)
User avatar
Fred Barclay
Level 12
Level 12
Posts: 4185
Joined: Sat Sep 13, 2014 11:12 am
Location: USA primarily

Re: Error adding User/Group during software install

Post by Fred Barclay »

That explains it - I'm stubborn but not lucky. :lol:
Image
"Once you can accept the universe as matter expanding into nothing that is something, wearing stripes with plaid comes easy."
- Albert Einstein
tomowmism

Re: Error adding User/Group during software install

Post by tomowmism »

Just a quick "thank you" to Chrisuk for starting this thread and following through with an answer. I installed LMDE a couple of days ago and yesterday started getting dpkg and groupadd errors (trying to install/configure Docker at the time). Finding this thread was a real life-saver! :)

Edit: The cause being a Firejailed instance of Firefox, as I was reading the Docker Docs at the time, resolved by closing Firefox and making sure Firejail wasn't running.
chrisuk

Re: Error adding User/Group during software install

Post by chrisuk »

tomowmism wrote:Just a quick "thank you" to Chrisuk for starting this thread and following through with an answer. I installed LMDE a couple of days ago and yesterday started getting dpkg and groupadd errors (trying to install/configure Docker at the time). Finding this thread was a real life-saver! :)

Edit: The cause being a Firejailed instance of Firefox, as I was reading the Docker Docs at the time, resolved by closing Firefox and making sure Firejail wasn't running.
Yeah, it's always Firefox running in firejail that caused it for me... I've a habit of closing Firefox before doing any admin tasks now... until Mint or myself update to a newer Kernel
Locked

Return to “LMDE Archive”