-
I would like to add a user with ctlmgr_ctl |
Beta Was this translation helpful? Give feedback.
Replies: 15 comments 6 replies
-
I know how to list them.
|
Beta Was this translation helpful? Give feedback.
-
I found this page: still reading... |
Beta Was this translation helpful? Give feedback.
-
WIP I created the LUA-script "queries.lua" and have it working.
I think this will give me the name for a new user if I wish to make one
This seems to be the command to create a user:
And it worked:
|
Beta Was this translation helpful? Give feedback.
-
This works
this doesn't, but I'm probably doing it wrong I have to catch a train now ;-) |
Beta Was this translation helpful? Give feedback.
-
With this startup script I want to make sure that an AVM user exists which I initially give the password that's on the back of the box... It didn't work, so I gave these commands on the prompt to check why and it seems AVM doesn't want you to create a user with the password on the back.
I solved this by adding an exclamation mark.
|
Beta Was this translation helpful? Give feedback.
-
The main reason for adding a user is because I do not want to lose access to the AVM-interface from the Internet. The code I have here depends on /sbin/set.lua Typically I provision a box by pushing the firmware, setting the Internet connection and enable a user. Someone else then installs the box and tells me the IP if Internet is working. After a factory reset there's of course no Internet access, but I can easily talk a user through the setup. If the box is decommisioned I can just flash the standard firmware on it.
|
Beta Was this translation helpful? Give feedback.
-
/sbin/set.lua and /sbin/queries.lua are copied from this website
As far as I can gather they are written by PeterPawn, well-known author of Freetz related stuff. cat /sbin/queries.lua
cat /sbin/set.lua
|
Beta Was this translation helpful? Give feedback.
-
I dont understand why you need these lua files. You could use plain ctlmgr_ctl and it does the same and you will not get compatibility problems |
Beta Was this translation helpful? Give feedback.
-
To read the variables and write simple variables I can use ctlmgr_ctl, but for writing arrays I couldn't find the proper syntax. The article where I got the 2 scripts they talk about speed and it is clearly faster. BTW I do need some of this speed as the router reboots the moment you select the region. |
Beta Was this translation helpful? Give feedback.
-
I also dont know how writing arrays, but multiple variables within 1 command should work. I have not tested it, but only reading multiple with 1 command |
Beta Was this translation helpful? Give feedback.
-
The reading of multiple single dimensional variables is not the same as arrays. I have tested several ways and couldn't get any of them to work. I'm still communicating with AVM's framework with that set.lua or I wouldnt get an error message that I can't add a user with the password on the back. All speculation, of course. |
Beta Was this translation helpful? Give feedback.
-
I just tried chatgpt feeding it all the commands and syntax that do work, but it can't find any logic in their syntax either. |
Beta Was this translation helpful? Give feedback.
-
Logic does not help with AVM |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
I have changed my code so I'm not using set.lua & queries.lua. Thanks again. |
Beta Was this translation helpful? Give feedback.
The main reason for adding a user is because I do not want to lose access to the AVM-interface from the Internet.
Even if the box gets a factory reset, a user gets created and the https port gets set.
The code I have here depends on /sbin/set.lua
It also needs some other variables set, but that's beyond the scope of this topic.
Typically I provision a box by pushing the firmware, setting the Internet connection and enable a user. Someone else then installs the box and tells me the IP if Internet is working.
In the past it happened that I forgot to create a user, so there's no access from the Internet to the box even if I know its IP.
After a factory reset there's of course no Internet acc…