Inventory System Triage Documentation

This page is meant to consolidate all of the how-to's related to the Inventory System.

Table of Contents

Guides to the Completion of Scheduled Tasks

Once a Term, at start of term

Add new co-ops and removing old co-ops

When we hire new co-ops and part time staff, we need to add them as users of the system. (See Adding a New User).

Co-op access typically includes an expiry date, so it is not critical that their accounts be deleted when they leave. You can optionally tidy upthe list of users.

Once every year

Tidying up the list of users by removing unneeded users (Optional)

Start by looking at the list of users who have access to the system. There will probably be some expired users that should obviously be removed. Once these users are identified, remove them as described in the Removing a User section.

Guides to the Completion of Common Requests

Adding a New User

Users must be added manually. There are two ways that this can be done; Either through the phpMyAdmin web interface (Method 1) or through terminal (Method 2).

Method 1

Via phpMyAdmin

  1. Log into https://cs.uwaterloo.ca/phpMyAdmin/ using your userid and mysql password (generally assigned by Isaac; not your WatIAM password). If you need access, send Isaac an email requesting an account, with access to the "equipment" database.
  2. Navigate to "equipment" database and "users" table in the left-hand menu
  3. Choose "Insert" from top menu-strip.
  4. Fill in the fields as follows:
    • userid: their 8-character userid
    • comment: format: Added by drallen on 7 April 2013
    • expires: if permanant staff, '9999-12-31' ; if co-op, date their work-term ends, possibly plus a few weeks extra in case they stay longer
    • Unit: CS
    • suFlag and swFlag: empty
    • flags: empty for read-only access; wm (for 'write' and 'mass-action') - for most users; or wmd (for 'write', 'mass-action', and 'delete')
  5. Choose "Save".
  6. Tell the user they are activated.
At this point they should be able to log in using their WatIAM password and the new user is added.

Method 2

Via SSH

  • ssh database.cs as root from cscf.cs
  • mysql
    • use equipment;
    • Use the following mysql syntax to add a row into users - see the example after the syntax instructions for specific details
MYSQL Insert Syntax:
INSERT INTO `users` (
 ` userid` , `comment` , `expires` , `unit` , `suFlag` , `swFlag` , `flags`
 ) VALUES (
  '$USERID', 'added 2012/05/08  ST #82450', '2012-06-01', 'CS', NULL, NULL, ''
);

MYSQL Insert Example for user in CS:

mysql > INSERT INTO `users` (
`userid` , `comment` , `expires` , `unit` , `suFlag` , `swFlag` , `flags`
) VALUES (
'jsmith', 'updated 2013/07/08  -- ST #12345', '2014-10-31', 'CS', NULL, NULL, ''
);
quit

flags can be set to '' for read-only access; 'wmd' for read/write/delete and mass-add/edit access; 'wm' for read/write and mass-add/edit access; and 'w' for read/write access.

Removing a User

User access will expire automatically after the expiration date. The user record is still available in mysql to show that they previously had access, but the user cannot log in.

Setting/changing a user's expiration date

  1. (As above under "adding a new user") log into PhpMyAdmin and navigate to "equipment" database, "user" table.
  2. select the "edit" button next to the user.
  3. change the date in the "expires" row.
  4. save the record. If the new expiration date is in the past, the user will immediately lose access.

Deleting a User

  1. (As above under "adding a new user") log into PhpMyAdmin and navigate to "equipment" database, "user" table.
  2. select the "delete" button next to the user. Confirm the deletion.

Common Failures/Bugs & Troubleshooting

People see a web-server 500 Error on a white background

The issue is probably the fault of CAS. Users will have to remove their browser cookies related to cs.uwaterloo.ca and re-authenticate.

The procedure for deleting cookies varies from browser to browser. http://www.aboutcookies.org/default.aspx?page=2 explains the process for all browsers.

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2013-07-17 - DrewPilcher
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback