> > [use sudo] > > > > > The last time I tried that, some years ago, it demanded the old > > > passwd first. I think that was about Red Hat 7.1's day. I'd been > > > using it since 1998 and 5.0. > > > > > > > i hope that this helps some for future reference. > > > > > > If no pw is needed, great. > > > > `passwd` invoked as the root user does not require you to provide the > > current password. You can set the password for any user, including the > > default user of root. So you would need to invoke 'sudo passwd' to > > change/set the root password without being prompted for the existing > > one. > > That policy has been changed then. Its been quite some time, possibly a > decade or more since I have attempted that procedure. The last time I > tried that, I was asked for the old password, and having forgotten it, > was refused. I wound up taking that drive to another machine and > removing the root pw in both passwd and shadow files. Then I could set > a new one and did when the drive was re-installed in the machine it ran. > > Cheers, Gene Heskett
i believe that gene is correct on this. checking with a couple of virtual machines that i have, have found that just with the 'sudo shutdown -r now' command the passwd changes. debian testing -- asks for the user's passwd centos7 -- asks for the user's passwd mageia -- asks for user's passwd opensuse leap -- asks for root's passwd personally i think that every distro should ask for a root passwd and one username upon installation. from there the sysadmin can assign people what privileges by putting them in whatever group, and then assign that group in /etc/sudoers.