We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

OnionOS user



  • Hi Community,

    Has anybody figured out if it is possible to grand the access to the OnionOS to another user (other than root)?

    Thanks,

    MK



  • @MK OnionOS / OpenWrt is a single user system, you can install a package to permit creation of users ad groups. So then it comes down to the permissions you create on whatever package you want to use. I haven't used the OnionOS stuff for a few years but as I recall it uses the the ubus acls ( @Lazar-Demin might correct me ). I use it with mod-ubus, here are my steps to create a user named admin:

    # Setting up for mod-ubus (php configuration)
    cd /usr/share/rpcd/acl.d/
    vi adminuser.json
    
    {
            "adminuser": {
                    "description": "Administrative user access role",
                    "read": {
                            "ubus": {
                                    "session": [
                                            "access",
                                            "login"
                                    ]
                            },
                            "uci": {
                                            "system": ["timezone", "zonename"],
    					"wireless":["*"]
    			
    			}
                    },
                    "write": {
                            "ubus": {
                                    "*": [ "*" ]
                            },
                            "uci": {
    					"system": ["*"],
    					"wireless": ["*"]
                    	}
    		}
            }
    }
    
    #add entry to /etc/config/rpcd
    config login
            option username 'admin'
            option password '$p$admin'
            list read adminuser
            list write adminuser
    
    #update /etc/passwd
    admin:x:200:200:admin:/var:/bin/ash
    
    #update /etc/shadow
    admin:$1$6Foyv2Pv$G/P624gFKZWld7YZkpQdP1:18278:0:99999:7:::
    
    #set the admin user password using passwd command
    
    
    /etc/init.d/rpcd restart
    
    

    Take a look at these files on your system and see how it's currently being used.


  • administrators

    @crispyoz this is a great example on creating a new user for ubus use! You beat us to the punch! Could you make a new FAQ?

    @crispyoz said in OnionOS user:

    I haven't used the OnionOS stuff for a few years but as I recall it uses the the ubus acls

    That's right! We use the root user though!



  • @Lazar-Demin I'll put something together as a FAQ. Might take a few days to have the time.


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.