I have two users in my CentOS system User1 and User2. I am logged in as root user and trying to add User1 to sudoer list using
visudo. I have entered the following line at the end of the file
User1 ALL = (ALL) NOPASSWD: ALL
But, when I log in as User1 the
su User2 command gives me a password prompt. I do not want to provide password and instead User1 should be able to switch to User2 without any password.