Difference between revisions of "Sysadmin/Add shell account"

From Sugar Labs
Jump to navigation Jump to search
(Added note about accents)
Line 1: Line 1:
 
'''Users looking for a Sugar Labs account should go to [[Service/Account]].'''
 
'''Users looking for a Sugar Labs account should go to [[Service/Account]].'''
 
The account requests arrive to a support queue on our RT system ([[Machine/rt]]).
 
  
 
== Guidelines ==
 
== Guidelines ==
Line 28: Line 26:
 
The email is also copied to ~user/welcome, in case they loose the
 
The email is also copied to ~user/welcome, in case they loose the
 
original message.
 
original message.
 +
 +
== Adding accounts on other machines ==
 +
 +
Please '''do not create accounts directly with useradd/userdel'''. Instead:
 +
 +
* Log into sunjammer forwarding your ssh agent (ssh -A)
 +
* Become root with `sudo -i`
 +
* Run this shell script to create a user and copy the credentials from sunjammer:
 +
 +
remote-useradd <remotehost> <user> <groups...>
 +
 +
Typically, you'll want to add users to groups `sudo`, `adm`, `libvirtd` and `docker`.
  
 
== See also ==
 
== See also ==

Revision as of 19:59, 23 June 2015

Users looking for a Sugar Labs account should go to Service/Account.

Guidelines

Ask users to follow diligently the Service/shell#Requesting_a_shell_account procedure.

Users should briefly motivate their request. A sufficient justification could be: "I have these Sugar-related files that I'd like to distribute on people.sugarlabs.org".

Shell accounts shouldn't be granted to untrusted individuals without referrals. Shell accounts that are known to be unused should be disabled with system-userdel.

Account creation on shell.sugarlabs.org

To create an account, become root on Machine/sunjammer and type:

system-useradd <username> <first_name> <last_name> <email>
  • Note that accents in the first_name or last_name would break the script.
  • NOTE: You have to become root with 'sudo -i'. Prefixing the command with sudo won't work because it doesn't switch $HOME to /root, which is necessary to make the ldap commands source /root/.ldaprc.

At some point the script will prompt you to paste the user's ssh key. You can skip this part and edit ~user/.ssh/authorized_keys manually.

The procedure automatically sends a welcome email to the user. The email is also copied to ~user/welcome, in case they loose the original message.

Adding accounts on other machines

Please do not create accounts directly with useradd/userdel. Instead:

  • Log into sunjammer forwarding your ssh agent (ssh -A)
  • Become root with `sudo -i`
  • Run this shell script to create a user and copy the credentials from sunjammer:
remote-useradd <remotehost> <user> <groups...>

Typically, you'll want to add users to groups `sudo`, `adm`, `libvirtd` and `docker`.

See also