SD Core for Windows WC2.0-0

Accounts and Security: The Other Keywords

The recovery copy, file transfer, where a session starts, and the other modify.account words.

This page continues Accounts and Security: Changing One Account.

The other keywords#

ssh | api | both | none what the account's remote access is. Absolute: api takes ssh away
ssh-key-on | ssh-key-off ssh sign-in with a key, for a user account whose Windows user SD made (see Signing in over ssh with a key). Off as delivered; independent of ssh: the account still needs its ssh route
sh-on | sh-off the sh verb
os-on | os-off OS.EXECUTE, the screen editors, the embedded Python, and operating-system paths outside the account's own directory (see above)
sd-on | sd-off the directories of other SD accounts the user could logto (see above)
voc-on | voc-off saving a change to a VOC (see The edit switches)
bp-on | bp-off saving a change to a program file, and compiling and cataloging
dict-on | dict-off saving a change to a dictionary
recovery-on | recovery-off whether the ide keeps a recovery copy of text that was not saved (see The recovery copy). Not a gate; off as delivered; user accounts only
xfer-on | xfer-off moving plain-text files in and out with an sftp client over the ssh login (see File transfer). Off as delivered; user accounts only; needs XFER=1 in sd.conf as well
net-on | net-off the right to use a server defined for SDNet (see The NET switch)
shared-read-on | shared-read-off opening the files of the shared account by name. On unless the field says no (see The shared account)
shared-write-on | shared-write-off writing to the files of the shared account. Off unless the field says yes
files-on | files-off the files-only API login: membership of the Windows group sdfiles (see The files-only route). Independent of ssh/api/both/none: those words leave it alone
files-write-on | files-write-off the right to CHANGE files over the files-only login: membership of the Windows group sdfileswrite, which needs files-on first (files-off takes every files group away)
files-admin-on | files-admin-off the right to ADMINISTER files over the files-only login: membership of the Windows group sdfilesadmin, which needs files-on and files-write-on first (see Administering files)
ai-on | ai-off the right to use the AI the administrator has chosen: membership of the Windows group sdaiusers (see The AI)
start-menu | start-terminal | start-default where a session on a terminal starts (see Where a session starts)
pins-on | pins-off whether the person may add their own programs to the home screen
suspended | unsuspended whether the account can be entered at all
add | delete user put a Windows user in, or out of, the account's group

The first group is absolute and the second is not. ssh/api/both/ none are four names for one state, so whatever is not named is withdrawn (of ssh and the API: files-on is its own setting and is not withdrawn by them). sh-on and os-on are two independent switches over two separate settings, so sh-off says nothing about OS.EXECUTE and leaves it alone; the other switches are each their own as well.

After either pair SD says where the account now stands, both fields at once, so that a command that did only what it named is plain to see:

:modify.account fred sh-on
Account fred has SH yes, OS.EXECUTE no
:modify.account fred os-on
Account fred has SH yes, OS.EXECUTE yes
:modify.account fred sh-off
Account fred has SH no, OS.EXECUTE yes

Asking for what is already so changes nothing and says so ("fred already had that access; nothing changed"). A route word reports the route in the same way ("SD routes for fred: ssh and the API." — "fred has no remote access: not ssh, not the API").

A change takes effect the next time the account is entered. The setting is read when a session signs in, and for sh, os, sd, net and the two shared switches again when it logtos into the account (the three edit switches are read at sign-on only), so a session already open keeps what it started with. To take a grant away from somebody who is signed in now, change the setting and then end their session.

Every one of these words is written to the audit trail (modify.account sh-on account=fred and its siblings), and SDSYS is never a target: the account is refused before the word is read, whatever you asked for, with "modify.account does not change sdsys, the administrator; its remote access is opened and shut with remote.sdsys" (SDSYS's own routes are not a modify.account setting; see Read this before anything else). A group account is refused too for the sh-on/sh-off/os-on/os-off forms: it has no Windows user to hold the switch.

Upgrading keeps what accounts have. The installer carries sh and OS.EXECUTE into each account once, from what the earlier system had given its people (see The operating-system switches), so that nobody loses a command they were using; in the same way it switches voc-on, bp-on and dict-on on, once, for every user account whose field is blank. Ssh and the API are left exactly as they were. Group and other accounts are left off on purpose. net-on is not part of it: nothing used SDNet before, so every existing account has it off. The shared switches are not part of it either: a blank field already reads as shared.read on and shared.write off, which is how they are delivered, so every existing account can read the shared account's files and none can write them (take the read right away with shared-read-off before you put anything private there). Neither is files-on: the sdfiles group is made empty, and nobody is in it until you say so. You can then turn them off one account at a time, and a later install does not turn them back on. Only accounts made after the upgrade start with everything off.

The recovery copy: recovery-on and recovery-off#

modify.account account recovery-on | recovery-off
create.account user <name> recovery-on
:modify.account fred recovery-on
Account fred keeps a recovery copy of unsaved editor text: yes

With recovery-on the ide of that account copies the text of every record it has changed and not saved: after a second without typing, before it hands the screen to a program, and when the session ends. A hung-up terminal, a lost connection or an abort then does not lose the text. The copy sits in the person's own Windows profile, in AppData\Local\.local\state\sd\recovery\<account>\ (the profile the person's sign-in token names, never an environment variable), one file per record, readable only by the person, SYSTEM and the Administrators, outside every account; it is deleted when the person saves, closes or quits normally, and the next time the record is opened the ide asks whether to use the copy, delete it, or leave the record unopened (which keeps it). The record itself is never changed until the person saves. sed keeps no copies.

File transfer: xfer-on and xfer-off#

modify.account account xfer-on | xfer-off
create.account user <name> xfer-on
:modify.account fred xfer-on
Account fred may move files over its ssh login (receive / send): yes

With xfer-on, and with XFER=1 in C:\ProgramData\SD\sd.conf, the account's person can move plain-text files into and out of their own account with an sftp client (WinSCP, FileZilla, Windows' own sftp) signed in with the same name and password as for ssh. They open each transfer themselves, from their SD session, with receive or send (User: Moving Files In and Out); nothing can be moved before that command is typed or after it ends.

What turning it on opens, plainly. That person can then bring text of their choosing into the account from another machine, and take copies of the account's records out to another machine. That is all it opens, and it is held to this:

A change takes effect at the next connection: the register is read each time a client connects. To end a transfer that is under way, logout the person's session or the connection (it shows in listu as sftp).

On Windows, sshd needs no change of SD's for this. SD's ssh settings already send every ssh session, an sftp request included, to SD; until a transfer is opened, an sftp client is told in words that none is.

Where a session starts: start-menu, start-terminal, start-default and set.start.default#

A session on a terminal starts either in the home screen (a screen of tiles: the account's tools, a terminal, switch account and sign out; the User's guide has the page 29a) or at the command prompt. You decide, account by account, and you decide what an account with no setting of its own does:

modify.account fred start-terminal       fred starts at the prompt, whatever the default is
modify.account fred start-menu           fred starts in the home screen, whatever the default is
modify.account fred start-default        fred follows the default (the register field is made empty)
set.start.default terminal               accounts that follow the default start at the prompt
set.start.default menu                   ... or in the home screen
set.start.default                        says which it is now

Continued in#

Accounts and Security: The Home Screen, ssh Keys and Passwords — the home screen's tiles, ssh keys, suspension, the grant and passwords.