{"id":23661407,"url":"https://github.com/modcommunity/managing-user-permissions-in-sourcemod","last_synced_at":"2026-01-25T12:31:22.870Z","repository":{"id":269893509,"uuid":"908780847","full_name":"modcommunity/managing-user-permissions-in-sourcemod","owner":"modcommunity","description":"A guide on how to manage user permissions in SourceMod. This is useful for game servers in the Source Engine that have MetaMod and SourceMod installed. Made by @gamemann!","archived":false,"fork":false,"pushed_at":"2025-08-02T22:19:03.000Z","size":10,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-03T00:14:02.253Z","etag":null,"topics":["guide","metamod","permissions","source-engine","sourcemod","srcds","users"],"latest_commit_sha":null,"homepage":"https://blog.moddingcommunity.com/how-to-manage-user-permissions-in-sourcemod/","language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/modcommunity.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-27T00:31:36.000Z","updated_at":"2025-08-02T22:19:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"e4025a9c-edef-4423-8958-2dbe2ce7c2b2","html_url":"https://github.com/modcommunity/managing-user-permissions-in-sourcemod","commit_stats":null,"previous_names":["modcommunity/managing-user-permissions-in-sourcemod"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/modcommunity/managing-user-permissions-in-sourcemod","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modcommunity%2Fmanaging-user-permissions-in-sourcemod","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modcommunity%2Fmanaging-user-permissions-in-sourcemod/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modcommunity%2Fmanaging-user-permissions-in-sourcemod/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modcommunity%2Fmanaging-user-permissions-in-sourcemod/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/modcommunity","download_url":"https://codeload.github.com/modcommunity/managing-user-permissions-in-sourcemod/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modcommunity%2Fmanaging-user-permissions-in-sourcemod/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28752965,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T10:25:12.305Z","status":"ssl_error","status_checked_at":"2026-01-25T10:25:11.933Z","response_time":113,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["guide","metamod","permissions","source-engine","sourcemod","srcds","users"],"created_at":"2024-12-29T04:57:42.990Z","updated_at":"2026-01-25T12:31:22.864Z","avatar_url":"https://github.com/modcommunity.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"In this guide, I will show you how to manage user permissions in [SourceMod](https://www.sourcemod.net/about.php).\n\nSourceMod is a [MetaMod](https://www.metamodsource.net/about) addon that supports most games running on the Source Engine. It is a powerful and highly optimized platform for creating plugins and managing server administration. SourceMod is widely used in games such as [Team Fortress 2](https://store.steampowered.com/app/440/Team_Fortress_2/), [Left 4 Dead 2](https://store.steampowered.com/app/550/Left_4_Dead_2/), and [Counter-Strike: Source](https://store.steampowered.com/app/240/CounterStrike_Source/)!\n\nWhen running a game server with SourceMod installed, it is likely that at some point you'll want to grant yourself or others permissions such as the ability to kick and ban players (admin access).\n\n[**View Guide On TMC (Recommended Due To Better Formatting)**](https://blog.moddingcommunity.com/how-to-manage-user-permissions-in-sourcemod/)\n\n## Table Of Contents\n* [Finding Steam IDs](#finding-steam-ids)\n* [Flags](#flags)\n* [Passwords](#passwords)\n* [Immunity](#immunity)\n* [Managing User Permissions](#managing-user-permissions)\n    * [Using The `admins_simple.ini` File](#using-the-admins_simpleini-file)\n    * [Using The `admins.cfg` File](#using-the-adminscfg-file)\n* [Reloading Users](#reloading-users)\n* [See Also](#see-also)\n\n## Finding Steam IDs\nBefore assigning permissions to users, you will need to find their Steam ID. Both SteamID2 (`STEAM_X:X:XXXXXXXX`) and SteamID3 (`[U:X:XXXXXX]`) formats are supported in SourceMod.\n\nIf you're connected to a server running on the Source Engine, you can execute the `status` command in the Developer Console to retrieve the Steam IDs of the current players connected to the server.\n\nOtherwise, you may use tools such as [Steam ID Finder](https://www.steamidfinder.com/) and [Steam ID I/O](https://steamid.io/) to find Steam IDs.\n\n## Flags\nTo determine what specific permissions you want to assign to users, you need to understand SourceMod's flags system and what access they provide. Each flag is assigned using a single character.\n\nHere is a list of flags available in SourceMod.\n\n| Name | Flag | Purpose |\n| ---- | ---- | ------- |\n| reservation |\t`a` | Grants reserved slot access. |\n| generic | `b` | Grants generic admin (required for admin). |\n| kick | `c` | Grants access to kick other players. |\n| ban |\t`d` | Grants access to ban other players. |\n| unban | `e` | Grants access to remove bans. |\n| slay | `f` | Grants access to slay and harm other players. |\n| changemap | `g` | Grants access to change maps or major gameplay features. | \n| cvar | `h` | Grants access to change most ConVars. |\n| config | `i` | Grants access to execute config files. |\n| chat | `j` | Grants special chat privileges. |\n| vote | `k` | Grants access to start or create votes. |\n| password | `l` | Grants access to set a password on the server. |\n| rcon | `m` | Grants access to use [RCON](https://developer.valvesoftware.com/wiki/Source_RCON_Protocol) commands. |\n| cheats | `n` | Grants access to change the `sv_cheats` ConVar or use cheating commands. |\n| root | `z` | Enables all flags and ignores immunity values. |\n\nAdditionally, there are **custom** flags which can be used by plugins and such.\n\n| Name | Flag\n| ---- | ----\n| custom1 | `o` |\n| custom2 | `p` |\n| custom3 | `q` |\n| custom4 | `r` |\n| custom5 | `s` |\n| custom6 | `t` |\n\nMore information about flags may be found [here](https://wiki.alliedmods.net/Adding_Admins_(SourceMod)#Levels).\n\n## Passwords\nIf you'd like, you can require specific users to input a password before being able to use the custom permissions assigned to them. They will need to input this password every time they connect to the game server, but they can automate this process on their side if they'd like.\n\nFirstly, you'll want to modify the `addons/sourcemod/configs/core.cfg` file and change the `PassInfoVar` line value from `_password` to something custom such as `_test`. The user will need to know their specific password and the password you set `PassInfoVar` to.\n\nWhen the user connects to the game server, they will need to execute the following command in the Developer Console.\n\n```\nsetinfo \"\u003cPassInfoVar Password\u003e\" \"\u003cUser Password\u003e\"\n```\n\nFor example:\n\n```\nsetinfo \"_test\" \"myCustomPass123\"\n```\n\nIf the user wants to automate this process on their side, they'll need to modify the file `\u003cGame Dir\u003e/cfg/autoexec.cfg` and add the command above to the file.\n\n## Immunity\nThe `immunity` flag prevents admins from targeting one another depending on the client's immunity level.\n\nFor example, if the first admin has an immunity of `20` while the second admin only has an immunity of `10`. The first admin can target the second admin, but the second admin can not target the first admin.\n\n**NOTE** - Admins with the `z` flag (root) can target any player or admin regardless of immunity level.\n\n## Managing User Permissions\nManaging user permissions and assigning flags is done by modifying a file inside of the `addons/sourcemod/configs` directory (or `addons\\sourcemod\\configs` folder on Windows).\n\nThere are two files you may edit which are explained below.\n\n### Using The `admins_simple.ini` File\nThis file is used for quickly assigning user permissions. This is best for simple setups or wanting to quickly assign permissions to a user. When assigning permissions in this file, each line should have the following format.\n\n```\n\"\u003cSteam ID/!IP/Steam name\u003e\" \"[Immunity Level:]\u003cFlags/@group\u003e\" [\"password\"]\n```\n\nHere is an example of granting a user the `reservation`, `generic`, `kick`, and `ban` flags with `70` immunity.\n\n```\n\"STEAM_0:0:36969327\" \"70:abcd\"\n```\n\n### Using The `admins.cfg` File\nUsing this file requires inputting more lines when assigning permissions to users, but may be considered cleaner. The format of the file uses SourceMod's [KeyValues](https://wiki.alliedmods.net/KeyValues_(SourceMod_Scripting)). Users should be added inside of the `Admins` section.\n\nHere is a generic format for adding users.\n\n```\n\"\u003cName\u003e\"\n{\n    \"auth\"          \"steam\"\n    \"identity\"      \"\u003cSteam ID\u003e\"\n    \"flags\"         \"\u003cFlags\u003e\"\n    \"immunity\"      \"\u003cImmunity\u003e\"\n}\n```\n\nHere is a list of *keys* you can assign to each user.\n\n* `auth` - Must be one of `steam`, `name`, or `ip` (unless there is a custom auth method), and instructs SourceMod how to interpret the identity value.\n* `identity` - A qnique value that allows SourceMod to find the user given an authentication method and the given value.\n* `password` - Specifies the password the user must enter.\n* `group` - Specifies a group name the user should inherit if available. More than one *group* line can be specified. There should be no `@` symbol as there is no ambiguity.\n* `flags` - The access flags the user should receive.\n* `immunity` - The immunity level the user should receive.\n\n## Reloading Users\nAfter assigning permissions to user(s) through the files mentioned above, you will need to reload the admin cache so that the permissions propagates.\n\nThe cache should automatically reload when the map changes or server restarts. You may use the server command `sm_reloadadmins` to reload the cache manually so you don't have to wait until a map change or server restart.\n\n## See Also\n* [Adding Admins](https://wiki.alliedmods.net/Adding_Admins_(SourceMod)) - Detailed Wiki on adding admins officially by AlliedMods.\n* [SourceBans++](https://sbpp.github.io/) - A popular plugin that makes it easier to manage users, groups, bans, and more!\n\nIf you have any questions or feedback regarding this guide, please reply to its forum topic [here](https://forum.moddingcommunity.com/t/how-to-manage-user-permissions-in-sourcemod-2025/509)! This guide will be worked and improved on over time.\n\nJoin our [Discord server](https://discord.moddingcommunity.com)!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodcommunity%2Fmanaging-user-permissions-in-sourcemod","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmodcommunity%2Fmanaging-user-permissions-in-sourcemod","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodcommunity%2Fmanaging-user-permissions-in-sourcemod/lists"}