[root@kvm8 ~]# visudo [root@kvm8 ~]# grep dygrp /etc/sudoers %dygrp ALL=(ALL) /sbin/hwclock
[root@kvm8 ~]# groupadd dygrp [root@kvm8 ~]# useradd --groups dygrp deyu21
[root@kvm8 ~]# id deyu21 uid=3586(deyu21) gid=3587(deyu21) groups=3587(deyu21),3586(dygrp)
[root@kvm8 ~]# echo qweqwe | passwd --stdin deyu21 BAD PASSWORD: The password is shorter than 8 characters
[root@kvm8 ~]# su --login deyu21
[deyu21@kvm8 ~]$ hwclock hwclock: Cannot access the Hardware Clock via any known method. hwclock: Use the --verbose option to see the details of our search for an access method.
[deyu21@kvm8 ~]$ sudo hwclock
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
For security reasons, the password you type will not be visible.
[sudo] password for deyu21:
2025-10-22 14:44:45.757316+08:00