| 237 | == Changing FlowVisor password in FOAM == |
| 238 | |
| 239 | FOAM's database stores information about FV, including its hostname and password. If you want to change FV's password, you need to change it both in FV itself, and also in FOAM. |
| 240 | * Change the password in FlowVisor: this assumes `/etc/flowvisor/config.xml` FlowVisor's config, and is owned by user `openflow`: |
| 241 | * Change the password in flowvisor's config: |
| 242 | {{{ |
| 243 | $ sudo service flowvisor stop |
| 244 | $ sudo -u openflow fvconfig chpasswd /etc/flowvisor/config.xml fvadmin |
| 245 | Enter password for account 'fvadmin' on the flowvisor: |
| 246 | Enter password again |
| 247 | $ sudo service flowvisor start |
| 248 | }}} |
| 249 | * If you store the password in `/etc/flowvisor/fvpasswd`, change it there too by hand: |
| 250 | {{{ |
| 251 | $ sudo vi /etc/flowvisor/fvpasswd |
| 252 | }}} |
| 253 | * Change the password in FOAM. Future versions of foamctl will support the `config:set-flowvisor-info` command. If you are running foam-0.6.3, that command doesn't exist yet, so you'll need to use a helper script which invokes curl to talk to FOAM: |
| 254 | * Copy the script `change_foam_fvinfo.py` from [https://openflow.stanford.edu/display/FOAM/Scripts+for+admins] on your foam |
| 255 | * Ask FOAM for the current FlowVisor information, so you can set any fields you do not want to change to the same values again: |
| 256 | {{{ |
| 257 | $ foamctl get-config --key="flowvisor_info" --passwd-file=/opt/foam/etc/foampasswd |
| 258 | { |
| 259 | "value": { |
| 260 | "passwd": "<old_fv_passwd>", |
| 261 | "xmlrpc_port": 8080, |
| 262 | "host": "<old_fv_host>", |
| 263 | "json_port": 8081 |
| 264 | } |
| 265 | } |
| 266 | }}} |
| 267 | * Invoke that script to set FOAM's FlowVisor info the same way you would on an initial install: |
| 268 | {{{ |
| 269 | $ python change_foam_fvinfo.py --passwd-file=/opt/foam/etc/foampasswd |
| 270 | FlowVisor Hostname: <old_fv_host> |
| 271 | FlowVisor XMLRPC Port [8080]: |
| 272 | FlowVisor JSON RPC Port [8081]: |
| 273 | fvadmin user password: |
| 274 | { |
| 275 | "status": "success" |
| 276 | } |
| 277 | }}} |
| 278 | |