rootasrole 4.0.0

A better alternative to sudo(-rs)/su
{
    "version": "4.0.0",
    "roles": [
        {
            "name": "r_root",
            "actors": [
                {
                    "type": "user",
                    "name": "ROOTADMINISTRATOR"
                },
                {
                    "type": "user",
                    "name": "root"
                }
            ],
            "tasks": [
                {
                    "options": {
                        "workdir": {
                            "default": "all"
                        },
                        "env": {
                            "override_behavior": true
                        }
                    },
                    "name": "t_root",
                    "purpose": "access to every commands",
                    "cred": {
                        "setuid": {
                            "fallback": "root",
                            "default": "all"
                        },
                        "setgid": {
                            "fallback": "root",
                            "default": "all"
                        },
                        "capabilities": {
                            "default": "all",
                            "sub": ["CAP_LINUX_IMMUTABLE"]
                        }
                    },
                    "commands": "all"
                },
                {
                    "name": "t_chsr",
                    "purpose": "Configure RootAsRole",
                    "cred": {
                        "setuid": "root",
                        "setgid": "root",
                        "capabilities": ["CAP_LINUX_IMMUTABLE"]
                    },
                    "commands": ["/usr/bin/chsr ^.*$"]
                }
            ]
        }
    ]
}