What's new

sudo: unknown user: root

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

zidler

Occasional Visitor
Code:
[me@AC5300][/tmp/home/root]> opkg install sudo
....
[CODE][me@AC5300][/tmp/home/root]> sudo ls
sudo: unknown user: root
sudo: unable to initialize policy plugin

What should I do?
Need sudo for other reasons. Thank you.
 
What should I do?
Need sudo for other reasons. Thank you.
No sure why you need SUDO if you are already ROOT on your router - SUDO switches temporary to ROOT if you are NOT superuser... :rolleyes:

admin@RT-AC87U:/tmp/home/root# opkg list | grep sudo

sudo - 1.8.14p3-1 - Sudo (su "do") allows a system administrator to delegate authority to give certain users (or groups of users) the ability to run some (or all) commands as root or another user while providing an audit trail of the commands and their arguments.
 
No sure why you need SUDO if you are already ROOT on your router - SUDO switches temporary to ROOT if you are NOT superuser... :rolleyes:
As I mentioned, I need it for personal reasons. Got tons of bash scripts I copy between my servers, most of them contain sudo in aliases. I don't want to redact 20 files, just to make it work.
 
As I mentioned, I need it for personal reasons. Got tons of bash scripts I copy between my servers, most of them contain sudo in aliases. I don't want to redact 20 files, just to make it work.
That makes no sense. :confused: Not having sudo on the router won't effect bash scripts running on other servers.

Or do you mean your bash scripts copy files between servers? In which case the error message suggests that you don't have a user called "root" which is normally true. The "root" user is normally called "admin" in asuswrt, but your output suggests you have called it "me".
 
That makes no sense. :confused: Not having sudo on the router won't effect bash scripts running on other servers.

Or do you mean your bash scripts copy files between servers? In which case the error message suggests that you don't have a user called "root" which is normally true. The "root" user is normally called "admin" in asuswrt, but your output suggests you have called it "me".

and? how can I add root user to the sistem? Sudo wont work without it.
 
and? how can I add root user to the sistem? Sudo wont work without it.
The router is designed to be a single-user machine. (Nearly) everything runs as the "root" account. That's why there is no useradd, userdel, usermod, groupadd, groupdel, etc.
 
or use sed.

sed 's/sudo //g' oldfile > newfile


The symlink of sudo to /bin/false seems much easier but I dunno enough to know if there would be potential problems.
 
Similar threads
Thread starter Title Forum Replies Date
C Script to notify unknown device connects to LAN ASUS Wi-Fi 3

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top