Overview
CoD4 Unleashed uses a UID (User ID) based authentication system for player identification and admin management. This system provides more reliable player tracking than GUID-based systems and integrates with password-protected admin accounts.UIDs are permanent numeric identifiers assigned to players. They are more reliable than GUIDs and support password authentication for administrators.
UID Authentication
How UIDs Work
The UID system assigns each player a unique numeric identifier that persists across sessions:- UID Range: Starts at 300,000,000 and increments
- Format: Integer value (e.g., 300123456)
- Persistence: Stored in server configuration
- Display: Prefixed with @ symbol (e.g., @300123456)
sv_auth.c:526
Authentication States
Players can have different authentication states:| State | Value | Description |
|---|---|---|
| Authenticated | 1 | Successfully authenticated with server |
| Timed Out | 0 | Authentication server timeout |
| Plugin/N/A | -1 | Plugin-based auth or not applicable |
sv_cmds.c:465-476
Player Identification
The server supports multiple ways to identify players: 1. UID (Preferred)sv_cmds.c:116-240
Admin Management
Admin Structure
The admin system supports up to 512 administrators with the following attributes:sv_auth.h:34-41
Power Levels
Admin power level from 1 to 100
- 1-9: Basic player/VIP
- 10-34: Junior moderators
- 35-79: Full moderators/admins
- 80-94: Senior admins
- 95-100: Super admins
Each command has a minimum power requirement. Higher-power admins can execute more commands.
Adding Admins
AdminAddAdmin - UID-Based Admin
Add an admin using their existing UID (player must have connected before).Player identifier:
- Online player name
- Online player slot number
- UID with @ prefix (e.g., @300123456)
Power level between 1 and 100
sv_auth.c:198-272
AdminAddAdminWithPassword - Password-Protected Admin
Create a new admin account with username/password authentication.Login username for the admin (unique)
Password (minimum 6 characters)
Power level between 1 and 100
- Passwords are hashed using SHA-256
- Random salt is generated for each account
- Session-based authentication for web admin
A new UID is automatically assigned to this admin account.
sv_auth.c:277-352
Removing Admins
Admin name or UID with @ prefix
sv_auth.c:355-389
Listing Admins
View all registered administrators.sv_auth.c:393-404
Password Management
Changing Your Own Password
Admins can change their own passwords.Your current password
New password (minimum 6 characters)
This command can only be used from in-game admin system or RCON.
sv_auth.c:484-521
Admin Password Reset
Super admins can reset other admins’ passwords.Admin name or UID with @ prefix
New password (minimum 6 characters)
sv_auth.c:463-482
Login System
In-Game Login
Admins with password-protected accounts must login to access admin commands.Admin username
Admin password
sv_auth.c:589-630
Session Management
For web admin and RCON:- Sessions use 64-character SHA-256 hashes
- Session IDs are stored temporarily for active users
- Sessions can be invalidated by password changes
sv_auth.c:59-94
Authorization Flow
Command Power Requirements
Setting Command Power Levels
Adjust the minimum power level required for any command.Command name (console commands only, not cvars)
Minimum power level (1-100)
sv_auth.c:641-667
Default Command Powers
| Command | Default Power |
|---|---|
| rules | 1 |
| kick | 35 |
| map_restart | 50 |
| AdminListAdmins | 80 |
| AdminAddAdmin | 95 |
| AdminChangePassword | 95 |
| AdminChangeCommandPower | 98 |
sv_cmds.c:1983-2000, sv_auth.c:684-691
Authorization Checks
Power Level Enforcement
All privileged commands check the invoker’s power level:sv_auth.c:801-807
Protection Against Abuse
Example from kick command:sv_cmds.c:1048-1051
Storage and Persistence
Configuration Format
Admins are stored in the server configuration file using infostring format:type: Always “authAdmin”power: Power leveluid: Player UIDpassword: SHA-256 hashsalt: Random saltusername: Login name
sv_auth.c:695-721
Loading Admin Configuration
sv_auth.c:723-742
Best Practices
Use Strong Passwords
Require passwords of at least 12 characters with mixed case, numbers, and symbols
Limit High Power Levels
Only grant power 95+ to fully trusted administrators
Regular Audits
Periodically review admin list with
AdminListAdminsUID Preference
Use UID-based identification over GUID when possible
Related Topics
Server Commands
Complete console command reference
Web Admin
Web-based administration interface
Security Features
Banning system and server security
Configuration
Configure server settings and cvars