SD Core for Linux LC2.0-0

Accounts and Security: The Home Screen, ssh Keys and Passwords

set.tile, pins-on, ssh-key-on, suspended, add and delete, and modify.password.

This page continues Accounts and Security: The Other Keywords.

What the home screen shows: set.tile, pins-on and the menu management page#

tool.menus

Menu management is a full-screen page for the administrator (SDSYS's VOC only; it is also a tile on the administrator's own home screen). It lists every account but SDSYS with where it starts, whether it may add its own programs, and the tiles turned off for it; for the account you select it shows the standard tiles (the seven of the account, the seven development tiles and the Recent group: 15 rows after the two settings above them) with [x] on and [ ] off, and a box that says in plain words what the settings mean. It writes nothing itself: every change is the command it will run, shown with its effect in a box you answer Run or Cancel (Cancel is the button Enter chooses), run by the same verbs you can type, and the line under the page is the verb's own answer. Every setting has a [?] at the end of its row (and one on the accounts list and on the system default): F1 or ? on the selected row, or a click on the [?], opens a box that says what the setting means, ending with the name of the administrator's guide PDF that says more (in the shared account's pdf directory), and a Close button. The text is the record of that setting in the file context.help of the shared account.

set.tile                          says which tiles are off, one line for each account that has any
set.tile account tile off         turn a tile off for that account
set.tile account tile on          turn it on again
modify.account account pins-on    the person may add their own programs to their home screen
modify.account account pins-off   they may not (the delivered state)

Signing in over ssh with a key: ssh-key-on and ssh-key-off#

modify.account fred ssh-key-on
modify.account fred ssh-key-off
create.account user fred ssh ssh-key-on

A Linux user that create.account makes cannot sign in over ssh with a key, as delivered. It signs in with its password, and only if the account's ssh route is on. ssh-key-on lets that one account sign in with a key as well as with its password; ssh-key-off takes it back; create.account user name ssh-key-on makes the account with it on. ssh-key-on does not give the ssh route: the account still needs ssh or both. The gate matrix (tool.gates) has a column for it, turning it ON there asks you to type the account's name, and each account's own gate page shows its state, as own for a user SD did not make. After the word SD says Account fred may sign in over ssh with a key: yes (or no). Only SDSYS may use the words. The word is audited as modify.account ssh-key-on account=fred, and the audit line of a create.account that used it ends gates= with ssh-key-on among the words.

What opening it means for security. A key is a second way in that the account's password does not control. Whoever holds the private key signs in without the password, SD cannot see who holds a copy, and changing or removing the password does not close it: the key stays valid until it is taken out of the person's authorized_keys file. Turn it on only for an account whose keys you trust, and leave it off for everything else; leaving it off is the tighter choice.

How it is done. The installer adds a setting to the ssh server's SD block that offers no key sign-in to the members of the Linux group sdsshnokey, and create.account puts each Linux user it makes in that group. ssh-key-on takes the user out of the group and ssh-key-off puts it back. The account's password sign-in is not touched either way.

Who it never affects. Only a Linux user that SD itself made. The user who ran the installer, a Linux user attached to an account, root, the sdsys user and every user outside SD keep exactly the ssh settings they had, and modify.account refuses ssh-key-on and ssh-key-off for them, saying that their keys are their own (a group account or an other account has no Linux user and refuses them too). The gate pages show a dash for them.

What it does not do:

suspended/unsuspended is a state, not a tier#

Nothing about the account moves except the one field. No group membership changes, no VOC changes — every account's VOC is the whole of newvoc regardless of the field. Three doors refuse a suspended account: signing in, logto, and the API.

logto refuses it to the administrator too. logto into a suspended account is refused for every session, SDSYS's included: Account fred is suspended, the session stays where it was, and the audit trail says logto refused account=fred reason=suspended. The administrator's maintenance of a suspended account does not need logto: run.in fred ... (basic, catalog, decatalog, delete.catalog, debug, compile.dict) still works in one, and modify.account fred unsuspended lifts the suspension.

add/delete is the grant#

:modify.account fred add pete
:modify.account fred delete pete

add and delete are the grant. There is no separate grant, revoke or list.grants verb: modify.account replaces them. The grant is Linux group membership, and nothing is written to the account record. Every SD account has a Linux group — sdu_name for a user account, sdg_name for a group account — and entry to the account is membership of that group (the test logto makes). add puts a Linux user into that group and delete takes one out, through the privileged helper (sd-elevate addgroup and delgroup). usermod -aG reaches the identical group directly, outside SD, at any time, by an administrator with a shell, so modify.account's value is the audit line, not a gate nothing else could reach.

SD says added to group, removed from group, is already a member of group or is not a member of (nothing changed), is not a member of sdusers, not allowed (the person is not a Linux user SD knows; add only), or Unable to add user ... status: n when the system refused the change.

To see who is in an account, read the Linux group: tool.accounts shows a group account's members, and any account's group can be listed with getent group sdu_name (sdg_name for a group account). The account's own user is a member like any other.

A successful add or delete writes an audit record to SD's audit trail (modify.account add account=nameto=user and modify.account delete account=namefrom=user), stamped with the user and process that did it. The identity is stamped by SD and is not passed in, so a caller cannot get it wrong or forge it.

delete is deliberately unguarded: taking access away is always allowed. To take it from somebody who is signed in now, delete and then end their session.

Passwords: modify.password#

modify.password {account}

With no account name it changes your own, and asks for the current password first. With one, from SDSYS, it changes that account's — any account, including SDSYS's own — and does not ask for the old password: an administrator resetting a forgotten password does not know it.

The password is never an argument, and a trailing token is refused rather than ignored:

:modify.password fred hunter2
A password is never given on the command line; modify.password prompts for it

That refusal is the point of the verb's design. A verb that threw the extra word away without a word would look as if it had worked, while the password had already reached SD's command stack, and a shell's history and process list if the verb was reached from one. Refusing does not put it back, but it says so.

The prompts are hidden, and the account must already exist in the register. The rule is checked before the repeat is asked for, and there are up to three tries:

The rule is said first (A password needs at least 8 characters, with a lower-case letter, an upper-case letter, a digit and a symbol.). A password that does not meet the rule is refused at once and is not asked for again; one that does is asked for a second time, and a difference between the two says Passwords do not match. Each failure says which attempt it was; the third ends the command with Password not changed. and nothing is changed. An empty line at New password leaves the password as it was. create.account user asks the same way, with the same three tries, saying the rule first and asking Retype new password. modify.password cannot be scripted, by design.

An ordinary account's own change goes through a privileged helper it cannot bypass (sd-elevate cred-own), because the credential file ($cred) belongs to sdsys alone; an administrator — a real sdsys login — writes it directly. At the terminal both look the same.

SDSYS's own Linux login password is a separate thing — set once, during installation (sudo passwd sdsys), and changed afterward the ordinary Linux way, not with this verb.

Continued in#

Account Maintenance — clean.account, update.accounts, [locked], config, set.date and delete.account.