DD-WRT Linux Education & Super User Acct

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Author Message
SillyWilly
DD-WRT Novice


Joined: 25 Sep 2018
Posts: 14

PostPosted: Tue Oct 23, 2018 18:58    Post subject: DD-WRT Linux Education & Super User Acct Reply with quote
One of the advantages of DD-WRT is that it allows me the opportunity of learning Linux at the expense of a router. I am looking to build a Linux machine but I need to decide on a Linux distributor. Been saying this for 5 years…

Linux reminds me of the old days of CP/M and OS9. Too bad Telenet will not squeal like an ASR33 teletype.

It seems that DD-WRT is using BusyBox. I found a link to the commands implemented by Busybox here:
https://www.busybox.net/downloads/BusyBox.html

I realize that DD-WRT also implements its own command set and I was able to find some information on the DD-WRT web site.

Can someone recommend a few books that will teach me about the file structure used by Linux and the commands used by the Linux shell?

One major question:
I do not like the idea of playing around while signed-on to the router as a “#super user”. Too easy to scramble the router’s brains and turn it in to a vegetable.

Is it possible to create a “regular user” account on my router and how would I do it? Will this new user account remain after future DD-WRT firmware updates?

THANKS

_________________
This is the voice of World Control. I bring you peace. It may be the Peace of Plenty and Content or the Peace of Unburied Death.
Sponsor
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6411
Location: UK, London, just across the river..

PostPosted: Tue Oct 23, 2018 21:00    Post subject: Reply with quote
bash ash dash all sh used by diff linux distributions
shame you didnt do your homework check youtube or ggl
if you fuck it up erase nvram and start again as well
learn how to do serial ddwrt wiki is a good way to start although
some of the info could be obsolete there is a good stuff to
start with

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55179 WAP
TP-Link WR1043NDv2 -DD-WRT 55303 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55460 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55460 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55363 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
Wildlion
DD-WRT Guru


Joined: 24 May 2016
Posts: 1410

PostPosted: Tue Oct 23, 2018 21:58    Post subject: Reply with quote
Why not buy a raspberry pi? Cheaper than a router, and can run actual linux distro and has the same things you are looking for such a limited users.

You can always install linux in a virtual machine and have it isolated and choose whatever. (this for free using virtual box)
bushant
DD-WRT Guru


Joined: 18 Nov 2015
Posts: 2030

PostPosted: Wed Oct 24, 2018 13:00    Post subject: Reply with quote
Why not dual boot your win machine with your choice of linux? I am using Kubuntu Mint Ubuntu. It's free. I have win10 Rolling Eyes on this one I am currently using but I have not seen it in months.
_________________
Forum Guide Lines (with helpful pointers about how to research your router, where and what firmware to download, where and how to post and many other helpful tips!)
How to get help the right way

Before asking for help - Read the forum guidelines AND Upgrade DD-WRT!
Adblock by eibgrad + Blocklist Collection
SillyWilly
DD-WRT Novice


Joined: 25 Sep 2018
Posts: 14

PostPosted: Wed Oct 24, 2018 18:04    Post subject: Reply with quote
I avoid using Youtube as much as possible because Google has flooded the site with too many advertisements.

Not sure what is meant by homework. Homework as to the proper syntax for the “useradd” command or homework as related to Mint, Ubantu or RedHat Linux?

The last time I used Unix was 30 years ago on a DEC MicroVAX programming in “COLT”. None of my personal or business friends use Linux so I have no sanity checks. I am just looking for a little reassurance in what I doing with DD-WRT / Linux. It was not developed to be a learning platform but learning is a major requirement of using of DD-WRT and this is completely acceptable to me.

I have looked at the Raspberry Berry pi some years ago. The biggest problem is the extra tabletop space required for another power brick, mouse, keyboard and monitor. With this footprint I would be better off building another dedicated computer with a KVM switch.

I got lucky at Goodwill and found a WRT1200ACS for $11. It is used as my DD-WRT / Linux leaning platform. I am not going to muck around with my Netgear R7800s! My family screams when they are offline for more than 30secs.

I cannot risk putting a virtual machine or a dual boot on my main computers. My systems are all dedicated custom hardware builds using Win7. The only computer available for tinkering is the one I use for internet access.

I recently acquired a Lenovo R500 laptop and I am in the process of rebuilding it. Here is an opportunity for me to install Linux. I still need to decide on a flavor that meets my needs.

_________________
This is the voice of World Control. I bring you peace. It may be the Peace of Plenty and Content or the Peace of Unburied Death.
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6411
Location: UK, London, just across the river..

PostPosted: Wed Oct 24, 2018 22:48    Post subject: Reply with quote
ok so you know what you are doing
few things to be aware of
1. dd wrt linux is not what you imagine its castrated stripped down
missing some commands and organised to serve only for router
requirements according to the different flash size rams on different
routers so lower flash ram lesser capabilities and only basic stuff
2. wrt1200 asc. or whatever is has a marvel SoC and its not famost to
be a great and compatible worry free unit like R7800 is
basically 1200 is stay away unit for beginners
3. if are worried about ad-floods in Youtube you can fairly use a adblocking
script on your R7800 like i do on all my DD-WRT routers or just use Privoxy if your
router has it as a service...R7800 does have it
4. i also do believe win7 was the last robust Windows and have it customised,
but i also have virtual box on it and can run whatever i want on virtual machine,
linux, unix, win 10, name it got it install it set the resources to use create an image
or just load an image and this is it simple...

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55179 WAP
TP-Link WR1043NDv2 -DD-WRT 55303 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55460 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55460 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55363 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
SillyWilly
DD-WRT Novice


Joined: 25 Sep 2018
Posts: 14

PostPosted: Sat Oct 27, 2018 0:05    Post subject: Reply with quote
I am referring to the video ads that Google forces me to watch before I can view the real video content. Then, in the middle of the video, I am forced to watch another video ad. As far as I know, these annoying video ads cannot be blocked. If I am watching a video on QNAP configuration, that is all I want to see.

It would be an act of mercy if I killed the 1200ASC. A WRT1200v1 would get a little more respect.

I already lost my Windows 3.11 system because of carelessness. Thus, I am now very over protective of my Win7 machines. The day I kill them is the day I go back to using my Kaypro and CP/M.

We are supposed to get 2in of rain this weekend. It will give me the time needed to resurrect the R500. I feel more comfortable with dedicated machines then virtual machines. Even software like System Commander never really appealed to me. Old fashion or just stubborn…

Any thoughts on a decent Linux book(s) outside of the “Dummy Series”?


take axe - throw axe - you killed a little dwarf Twisted Evil
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6411
Location: UK, London, just across the river..

PostPosted: Sat Oct 27, 2018 7:10    Post subject: Reply with quote
hahaah Win 3.11 very very old school i used to like 98/millenium edition had it for years on an old comp...
Kali linux is good to start with, and there are many videos and books about it..some free some not for free...
look at https://stackskills.com there are good courses for a decent price or free sometimes..
in regards to DD-WRT ad blocking there are some complex scripts that are very efficient of blocking ad-s and so
personally i use very simple script and does a good blocking
for its needs also you can fairly add those in additional DNSmasq options to block ads via DNSmasq rules
there is an attachment for you just copy paste those in additional DNSmasq



adblock.txt
 Description:

Download
 Filename:  adblock.txt
 Filesize:  18.14 KB
 Downloaded:  450 Time(s)


_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55179 WAP
TP-Link WR1043NDv2 -DD-WRT 55303 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55460 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55460 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55363 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
SurprisedItWorks
DD-WRT Guru


Joined: 04 Aug 2018
Posts: 1446
Location: Appalachian mountains, USA

PostPosted: Thu Feb 13, 2020 0:57    Post subject: Reply with quote
On my routers (I don't know whether it's the same for models with less memory), I find that the dd-wrt busybox shell matches the modern linux bash shell re most of the basics you'd use to explore or to write small shell scripts. When it is missing features (e.g. arrays), it generally matches the older Bourne shell.

You can easily google tutorials on just about any aspect of bash scripting. I use that a lot, as my memory is not good for detail even though I've been programming Unix shell scripts for some 37 years now. Maybe I'm just getting too old. Books are tricky. I haven't looked in ages, but the last time I did, there was a lot of junk out there. (Some of the online stuff is junky/stupid also, with dumb examples like using "cat <fileName | someCommand" rather than "someCommand <fileName".)

Re scrambling your router... Yes, I had that fear in the beginning also. But if you stay away from the nvram command and have not added any permanent flash storage to your router via the USB port, it's pretty much impossible to scramble dd-wrt in any way that can't be resolved by rebooting the router. This is because it does not have a permanent filesystem. Most of the filesystem is read-only, and the read/write part, in /tmp, is rebuilt from scratch on every boot. Where you CAN cause yourself grief is messing around in the GUI/webpage, as that actually changes nvram. Be careful there.

Your comment about CP/M and OS9 is pretty funny. That would have been a good comment 25 years ago.

_________________
2x Netgear XR500 and 3x Linksys WRT1900ACSv2 on 53544: VLANs, VAPs, NAS, station mode, OpenVPN client (AirVPN), wireguard server (AirVPN port forward) and clients (AzireVPN, AirVPN, private), 3 DNSCrypt providers via VPN.
SurprisedItWorks
DD-WRT Guru


Joined: 04 Aug 2018
Posts: 1446
Location: Appalachian mountains, USA

PostPosted: Mon Dec 05, 2022 21:11    Post subject: Reply with quote
Yes, it still holds. All I'd add is that the very much optional setup, in GUI>Administration>Management, of JFFS2 Support, which I have never done myself, does create a small permanent filesystem. If you leave that disabled and do not plug a USB drive into your router, everything is temporary and re-initialized on boot except what's in the nvram configuration. That nvram config is changed only in the GUI or by the nvram command in the CLI. Be careful with those two, and it's really hard to break anything.

However, there are a small number of other (besides nvram) CLI commands you should stay away from unless you are 100% sure you know what you are doing. The "write ..." command can be used to flash a new build. The wiki claims there's a "setuserpasswd ..." command that will modify nvram, but I've never used it. And for some routers there's an "erase ..." command that is mostly used to cause great misery to router owners. (The proper way to reset the nvram config to dd-wrt defaults in the CLI is "nvram erase" and a reboot, or do them together: "nvram erase && reboot". Do not do a 30-30-30 reset unless you know for certain it's OK for YOUR model of router. It's mostly deprecated and hazardous these days.)

That said, there are plenty of serious dd-wrt people around here who know far better than I what's what with all this. I'm counting on them to chime in if I have misstated or omitted anything serious! On this business I am NOT an expert, just a user.

And yes, dear reader, "necro posts" resurrected from the dead are generally frowned upon. However, this thread seems pretty timeless to me.

_________________
2x Netgear XR500 and 3x Linksys WRT1900ACSv2 on 53544: VLANs, VAPs, NAS, station mode, OpenVPN client (AirVPN), wireguard server (AirVPN port forward) and clients (AzireVPN, AirVPN, private), 3 DNSCrypt providers via VPN.
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14126
Location: Texas, USA

PostPosted: Tue Dec 06, 2022 22:52    Post subject: Reply with quote
To fix 'continuity', spam bot "TravisDavis" asked if the information @SurprisedItWorks posted earlier in thread was still relevant, just in case people are scratching their head reading this thread in the future and wondering where the gap is or why someone was "replying to themselves" or whatever. Folks, please be aware not all necro-bumps are real people and be cautious of interacting with them. So ends my PSA here for now. You're welcome.

Cool Wink

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 371

PostPosted: Wed Dec 07, 2022 17:43    Post subject: Re: DD-WRT Linux Education & Super User Acct Reply with quote
SillyWilly wrote:
I do not like the idea of playing around while signed-on to the router as a “#super user”. Too easy to scramble the router’s brains and turn it in to a vegetable.

Is it possible to create a “regular user” account on my router and how would I do it? Will this new user account remain after future DD-WRT firmware updates?

Using root is fine. All of the filesystems on dd-wrt are read-only except for the RAM disk /tmp (unless you add a USB stick). If you mess things up, a reboot usually brings you back where you were. If you mess up the nvram settings, you can usually just restore a backup you created earlier.

I've only ever used my linux machines in conjunction with dd-wrt when I decided to make my own dd-wrt builds otherwise putty is all you need. Becoming an expert at building/tweaking dd-wrt can be a fun & challenging hobby.

For youtube ads try ublock origin.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum