linux allow user to su to another user code example
Example: linux allow user to su to another user
#This will allow user1 to login to user2 without password
$ sudo visudo
#add this line
user1 ALL=NOPASSWD: /bin/su – user2
$ sudo su - user2
#This will allow user1 to login to user2 without password
$ sudo visudo
#add this line
user1 ALL=NOPASSWD: /bin/su – user2
$ sudo su - user2