Jump to content
MediaWiki

Manual:createBotPassword.php

From mediawiki.org
Languages:
MediaWiki version:
≥ 1.35
MediaWiki file: createBotPassword.php
Location: maintenance/
Source code: master1.43.11.42.61.39.12
Classes: CreateBotPassword

Details

[edit ]

createBotPassword.php file is a maintenance script to create a bot password for a user. See Manual:Bot passwords for more information.

Options/Arguments

[edit ]
Option/Argument Description Required?
<user> The username to create a bot password for Required
<password> A password will be generated if this is omitted. If supplied, it must be exactly 32 characters Optional
--showgrants Prints a description of available grants Optional
--appid App id for the new bot password Optional
--grants CSV list of permissions to grant Optional

Usage

[edit ]
phpmaintenance/run.phpcreateBotPassword[<user>|<password>|--showgrants|--appid|--grants]
In MediaWiki version 1.39.12 and earlier, you must invoke maintenance scripts using php maintenance/scriptName.php instead of php maintenance/run.php scriptName.

See the grants available

[edit ]
Terminal
$ php maintenance/run.php createBotPassword --showgrants
GRANT DESCRIPTION
basic basic
blockusers blockusers
createaccount Create new user accounts
createeditmovepage createeditmovepage
delete Delete pages
editinterface Edit the user interface
editmycssjs editmycssjs
editmyoptions Edit your own preferences
editmywatchlist Edit your own watchlist (note that some actions will still add pages even without this right)
editpage editpage
editprotected Edit pages protected as "Allow only administrators"
editsiteconfig editsiteconfig
highvolume highvolume
import Import pages from other wikis
mergehistory Merge the history of pages
oversight oversight
patrol Mark others' edits as patrolled
privateinfo privateinfo
protect Change protection settings and edit cascade-protected pages
rollback Quickly rollback the edits of the last user who edited a particular page
sendemail Send email to other users
uploadeditmovefile uploadeditmovefile
uploadfile uploadfile
viewdeleted viewdeleted
viewmywatchlist View your own watchlist
viewrestrictedlogs viewrestrictedlogs

Create a new bot account

[edit ]
Terminal
$ php maintenance/run.php createBotPassword Foo ff38s9u4feh07vjs2s6t88dh2pv5cfgv --appid FooBot --grants basic,createeditmovepage,highvolume
Success.
Log in using username:’Foo@FooBot' and password:'ff38s9u4feh07vjs2s6t88dh2pv5cfgv'.
Warning Warning: The grant "basic" is not optional! If you forget the grant "basic", you can see the cryptic error "readapidenied" when you use the MediaWiki API.

See also

[edit ]

AltStyle によって変換されたページ (->オリジナル) /