[root@kvm8 ~]# visudo [root@kvm8 ~]# grep dygrp /etc/sudoers %dygrp ALL=(ALL) /sbin/hwclock
[root@kvm8 ~]# groupadd dygrp [root@kvm8 ~]# useradd deyu21 -G dygrp
[root@kvm8 ~]# echo qweqwe | passwd --stdin deyu21 Changing password for user deyu21. passwd: all authentication tokens updated successfully.
[root@kvm8 ~]# su - 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.
[sudo] password for deyu21:
2022-08-30 15:26:52.203540+08:00