On 7/25/22 18:39, ToddAndMargo via users wrote:
On 7/23/22 18:18, stan via users wrote:
On Fri, 22 Jul 2022 10:04:37 -0700
ToddAndMargo via users <users@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
On 7/22/22 08:12, stan via users wrote:
passwd --unlock --expire root
Hi Stan,
Why did you throw --expire on the above command?
-e, --expire
This is a quick way to expire a password for an
account. The user will be forced to change the
password during the next login attempt. Available
to root only.
If the account has been locked, and never used, there is probably no
password. This ensures that the root user, gets to set the password
that they want. In fact, they can't access the root account without
setting a new password. This doesn't apply to installs that already
have an active root user (older installs). The new installs, from what
I understand, do not set up a root account password as part of the
install process. Everyone is supposed to use sudo, for its apparently
increased security, or convenience, or lack of confusion, etc. As I
said, I have only read about this, and haven't experienced it, so am
not aware of the actual state of the root account when that occurs.
Samuel has said the account always exists, so I assume that it must be
locked if a login wasn't created during the install.
Okay, I understand now. I thought your command both
unlocked and set the password. And I thought there
was some reason you were messing with the guy making
him change it the next log in.
You can't actually run that command ("test" is a newly created user, so
in the same state as "root" would be):
# passwd --unlock --expire test
passwd: Only one of -l, -u, -d, -S may be specified.
Also:
# passwd --unlock test
Unlocking password for user test.
passwd: Warning: unlocked password would be empty.
passwd: Unsafe operation (use -f to force)
The only thing you have to do is "passwd root" to set a password. It's
not locked and there's no point in expiring the password to an account
you're using yourself...
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure