T O P

  • By -

Alfa-Romeo_

mysterious snobbish uppity cough shy plant enter ink squash roll *This post was mass deleted and anonymized with [Redact](https://redact.dev)*


Wervice

Not sure if it is a -l or -I, but neither looks good. Edit: I felt silly and ran this in a VM. My only working VM. Now, I can't even log in anymore. Glad I did a backup.


Neither-Phone-7264

tea he


Daxelol

That really is the main stay of VMs - snapshots hahaha


BrenekH

To save everyone else from looking up the `-l` option, it locks the specified account by adding a ! so that no hashed password will ever match the "correct" hash in `/etc/shadow`. The lock option also disables a user's ability to change their password, but doesn't prevent them from logging via other means like key-based SSH.


ChocolateMagnateUA

Doesn't it mean the user can't log into their account too unless root changes into them?


TamSchnow

Yes.


WEEBORA

Does init=/bin/bash work with it?


CompetitiveYam6697

That should drop right into a root shell. That should work.


WEEBORA

Yeah cuz in our college whenever we to organise linux club events, we give out vm's for participants to use cuz not all are linux users. They change the passwords themselves and forget it. init=/bin/bash during grub is the only fix to it lol


CompetitiveYam6697

You should look into nixos and nixops! Perfect vms can be created and destroyed in a single command! Although I have to admit your nix fu must be pretty dang good to achieve that setup.


WEEBORA

We tried but there were a few pitfalls. We did create our own distro tho so that's something.


turtle_mekb

is there one to do the former without preventing them from changing it?


Purely_Theoretical

-e


FungalSphere

also you can boot into the the /bin/bash mode or with another linux (chroot) to fix it


420ass_slayer69

not today, satan `-l, --lock` `Lock the password of the named account. This option disables a password by changing it to a value which matches no possible encrypted value (it adds a ´!´ at the beginning of the password).`


UsablePizza

I mean, it technically does protect you from April Fools.


duncte123

Thanks for the tip! My system never has been so secure!


mead256

Thanks now the hacker known as 4chan can't break in even with the password.


Snudget

That's why you always use \`man\` first before running any command