From Mageia wiki
Jump to: navigation, search

Request Verification

Each request must be verified to ensure that the user request is valid. We don't want random people taking over someone else's account. See the e-mail change procedure for some methods to verify a request.

Add a SSH key

To add an additional SSH key on a Mageia account, run this command, replacing USERUID and SSHKEYTEXT with the user's uid and new SSH key, respectively ($USER is entered literally and will automatically be replaced by your own current user login to authenticate the operation):

$ ldapmodify -H ldaps://ldap.mageia.org -D "uid=$USER,ou=People,dc=mageia,dc=org" -W <<EOF
dn: uid=USERUID,ou=People,dc=mageia,dc=org
changetype: modify
add: sshPublicKey
sshPublicKey: SSHKEYTEXT
EOF

Enter your own Mageia password to authenticate the change. You may run the following command to verify the change afterward:

$ ldapsearch -H ldaps://ldap.mageia.org -b ou=People,dc=mageia,dc=org -D "uid=$USER,ou=People,dc=mageia,dc=org" -W '(uid=USERUID)'

Replace a single SSH key with another

$ ldapmodify -H ldaps://ldap.mageia.org -D "uid=$USER,ou=People,dc=mageia,dc=org" -W <<EOF
dn: uid=USERUID,ou=People,dc=mageia,dc=org
changetype: modify
replace: sshPublicKey
sshPublicKey: SSHKEYTEXT
EOF

Delete a SSH key

$ ldapmodify -H ldaps://ldap.mageia.org -D "uid=$USER,ou=People,dc=mageia,dc=org" -W <<EOF
dn: uid=USERUID,ou=People,dc=mageia,dc=org
changetype: modify
delete: sshPublicKey
EOF