Modify the system so the user must enter a password in order to
change the baud rate of can devices, making it so CanDbc can not
change the baud rate.

This script is essentially meant to undo the changes made by
the enable_candbc_nopasswd command.


sudo /cyflex/cmds/disable_candbc_nospasswd


The disable_candbc_nospasswd modifies the /etc/sudoers file and
removes the following line (if it is there):

%wheel ALL=(ALL) NOPASSWD:/usr/sbin/ip,/usr/bin/link

This line allows the test cell account user to execute the ip and
link commands, which require root/sudo privileges, without needing
to enter a sudo password. By removing it, the user will need to
enter a password to change the baud rate of a CAN device.

After executing this command, the user will need to execute the
following commands when changing the baud rate for a device
using CanDbc

sudo ip link set canX down
sudo ip link set canX up type can bitrate <rate>

where X is the integer representing the can device
and <rate> represents the baud rate

See Also:

CanDbc,  enable_candbc_nopasswd