No sure why you need SUDO if you are already ROOT on your router - SUDO switches temporary to ROOT if you are NOT superuser...What should I do?
Need sudo for other reasons. Thank you.
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.
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.No sure why you need SUDO if you are already ROOT on your router - SUDO switches temporary to ROOT if you are NOT superuser...
That makes no sense. Not having sudo on the router won't effect bash scripts running on other servers.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. 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".
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.and? how can I add root user to the sistem? Sudo wont work without it.
Try it yourself. Administration panel won't let you change it to root.Try this:
Go to Administration > System and change Router Login Name to "root".
No thanks.Try it yourself.
Like this idea. Thank you! Gonna try tomorrow.No thanks.
All I can suggest is that you replace the sudo binary with a soft link to /bin/true That way the command will appear to work even though it doesn't actually do anything.
Or just make a simple script called sudo that just executes the parameter list.
Even better Only thing I'm not sure of with either method is that the environment gets passed correctly.Symlink to /bin/sh?
Oh yeah, I forgot about passing the parameters, doh! It wouldn't be much use without them.Or just make a simple script called sudo that just executes the parameter list.
Thread starter | Title | Forum | Replies | Date |
---|---|---|---|---|
C | Script to notify unknown device connects to LAN | ASUS Wi-Fi | 3 |
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!