Due to the addition of sudo user accidentally added something or mistakenly deleted something, resulting in sudoers file invalidation, by asking some engineers and teachers, to give some solutions
1, through root repair, but the root password has been forgotten
2. Fix root password in single user mode, but because Tegra cannot enter single user mode
3, through Uboot repair, the concrete steps are
The question is how to get into uboot.
Minicom is generally installed on Ubuntu, the PC and the development version of the connection (generally with the USB to TTL of the cable),
But the problem is not even in the past.
Then an engineer told me to use a USB-to-USB adapter to connect the PC to the development version with Ptkterm later it didn't work.
- Finally, I tried to try it in a soft-fix way, and found this article.
Asher want to try a function that is related to sudo, so, just go to hard change/etc/sudoers this file (in fact, this is not the way, but that is another story!)), the result is that every time the sudo command is executed, it is wrong to execute sudo, and then There is no way to get the/etc/sudoers file back to normal, and then, you continue to use sudo, you start unlimited cycle ...
Asher because this/etc/sudoers file is not changed, so every time you execute sudo, you will be presented with the following message 臮, therefore, it is not possible to perform sudo, but this/etc/sudoers file is to have sudo permissions to modify it!
>>>/etc/sudoers:syntax error near line <<<
Sudo:parse error In/etc/sudoers near line 24
Sudo:no valid sudoers sources found, quitting
Sudo:unable to initialize policy plugin
Good to add! Asher has found this command called Pkexec can be used to solve this problem! This pkexec can execute the program with the specified user, without specifying the user, it will be executed with the root user, so Asher can use Pkexec to perform the Visudo correction problem with the following instructions!
Pkexec Visudo
After the operation, will appear to select the user's list, please select a user to enter the password, then you can enter into the Visudo to modify, Asher to the place where he has changed back to the archive and leave, after the sudo command back to normal! ...
Read MORE:HTTP://WWW.ARTHURTODAY.COM/2015/02/UBUNTU-MODIFY-A-INVALID-ETC-SUDOERS-FILE-WITH-PKEXEC.HTML#IXZZ4ER0IOIHL
From
Ubuntu-tegra Repair sudoers error operation generated without sudo permissions