You are not logged in.
It would be nice if someone coud test / confirm only **on virtual environment**, do not try it on main system.
Command has caused strange things:
# userdel -rf tox-bootstrapd
I didn't save terminal output, but every binary has ended with error "no such file or directory" and reboot has ended "root fs not syncing"
Maybe "-" hyphen is the bloodthirsty silent killer...
Last edited by Fixxer (2021-12-11 10:31:48)
Offline
What was that users home directory set to?
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
It's one user system, permissions are:
/root 750
/home/USER 700
In system there are no "against rules" and good practices modifications, umask is standard 0022.
Package toxcore isn't installed at the moment, it provides this settings in /usr/lib/sysusers.d/toxcore.conf.
There are also no symptoms filesystem nor hardware (ssd sata disk) failure, no significant kernel / system errors / warnings, etc. All is up to date, fully upgraded with stock kernel and linux-lts kernel (no custom kernel). There are also no foreign repositories instead of few local packages maintained on my own (unrelated).
EDITED:
The only visible deletion after command from first post there was lack of /etc directory. After restoring it with rsync from backup booting errors was the same (rootfs not syncing, /sbin/init not found, etc.) Probably /etc/passwd /etc/shadow was mismatched, but it's hard to say anything else.
Last edited by Fixxer (2021-12-11 05:42:37)
Offline
That doesn't aswer fukawi2's question at all.
The bloodthirsty killer is "-f" and while there might still be /bin, /sbin, /usr/bin directories, I guess they're now empty?
Chances are that the users $HOME was set to "/" and you went on to delete the user, his $HOME … and because of "-f" all files, even if they didn't belong to that user.
If you have a backup of the system that had the user included, check the /etc/passwd of that backup and where the users $HOME resided.
Online
Ok. It's not a bug - it's a feature Canonical examaple of "stupid commands which lead to fuckup". So be careful and do not use /-f/ force flag with userdel.
> The bloodthirsty killer is "-f" and while there might still be /bin, /sbin, /usr/bin directories, I guess they're now empty?
Safeguard / protection against rm -rf / works. There was deleted /etc directory and some other files (?), but not content of /bin/ /sbin /usr/bin.
By the way, it's rather not the best idea to set some system users home directory to "/", look at /usr/ilb/sysusers.d/*.conf. When system user home directory is set, eg. lxdm -> /var/lib/lxdm, then it's all OK. The tragedy is when home directory is set to "/" and flag / -f / is used.
Last edited by Fixxer (2021-12-11 10:34:19)
Offline
The tragedy is when … flag / -f / is used.
ftfy.
Online
So be careful and do not use /-f/ force flag with userdel.
No. Be careful and understand what commands do before blindly running them on your own systems.
By the way, it's rather not the best idea to set some system users home directory to "/"
I can't think of any reasonable use case for this. If this came as part of a package, you should file a bug. If you did it yourself, well, caveat emptor.
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline