no sudo?

If your problem doesn't fall into one of the other categories, report it here.

Moderator: Moderators

Post Reply
Hercules
Posts: 23
Joined: Sun Sep 29, 2013 6:58 pm

no sudo?

Post by Hercules »

Hi all,

Might be a noob question but.... I previously was able to use sudo to be able to edit files via ssh but no more!

I just get "-ash: sudo: not found"

It might also be related to why I can't assign static IPs anymore they just vanish.

What am I doing wrong?

Gargoyle version 1.9.2 | OpenWrt Chaos Calmer branch
Gargoyle revision ecc1da74| OpenWrt commit 03d52cf
Built February 10, 2017 | Target ar71xx/usb

Lantis
Moderator
Posts: 6753
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: no sudo?

Post by Lantis »

There is no sudo as it is not required. The entire router runs as root (minus a few processes).
If you aren't able to add static assignments, that's a different issue that we can investigate.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

Hercules
Posts: 23
Joined: Sun Sep 29, 2013 6:58 pm

Re: no sudo?

Post by Hercules »

OK but I cant save anything to anywhere. I use vi as my editor and if I try and save i get the message "Read-only file system"

Just then I had a thought that perhaps I am out of space so I tried to delete a large file but I received the message
rm: can't remove 'block.hosts': Read-only file system
There is how much space is left just in case that is the issue:

Code: Select all

root@Gargoyle:/etc# df
Filesystem           1K-blocks      Used Available Use% Mounted on
rootfs                     768       704        64  92% /
/dev/root                 6144      6144         0 100% /rom
tmpfs                    63040       108     62932   0% /tmp
/dev/mtdblock3             768       704        64  92% /overlay
overlayfs:/overlay         768       704        64  92% /
tmpfs                      512         0       512   0% /dev

Lantis
Moderator
Posts: 6753
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: no sudo?

Post by Lantis »

You're out of space. When the router runs out of space (or gets very close to it) it switches to read-only mode.

You'll need to failsafe reset or re-flash at this point.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

Hercules
Posts: 23
Joined: Sun Sep 29, 2013 6:58 pm

Re: no sudo?

Post by Hercules »

I know how to reflash. What is a failsafe reset?

Lantis
Moderator
Posts: 6753
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: no sudo?

Post by Lantis »

https://www.youtube.com/watch?v=_NqHpRHl8gQ

https://wiki.openwrt.org/doc/howto/generic.failsafe

Boots your router into a recovery mode which bypasses any bad configuration. From there you can "firstboot -y" to reset your router to it's initial state post-flash.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

Hercules
Posts: 23
Joined: Sun Sep 29, 2013 6:58 pm

Re: no sudo?

Post by Hercules »

OK looks like a reflash!

Post Reply