Bugzilla – Attachment 272 Details for
Bug 2737
Ship script to make it easier to extra smart card key to authorized_keys
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
tl-get-cert
tl-get-cert (text/plain), 1.13 KB, created by
Peter Åstrand
on 2008-03-25 13:14:39 CET
(
hide
)
Description:
tl-get-cert
Filename:
MIME Type:
Creator:
Peter Åstrand
Created:
2008-03-25 13:14:39 CET
Size:
1.13 KB
patch
obsolete
>#!/bin/sh > >my_exit() >{ > if [ "$0" = "${XTERM_SHELL}" ]; then > echo "Tryck på ENTER för att avsluta." > read > fi > exit $1 >} > >thisuser=$1 > >if [ -z "${thisuser}" ]; then > echo -n "Ange användarnamn: " > read thisuser >fi > >homedir=`getent passwd ${thisuser} | cut -d: -f 6` > >if [ -z "${homedir}" ]; then > echo "Användaren ${thisuser} existerar inte." > my_exit 1 >fi > >if [ ! -d "${homedir}" ]; then > echo "Skapar katalogen ${homedir}" > mkdir "${homedir}" > chown ${thisuser} "${homedir}" > chmod 700 "${homedir}" >fi > >sshdir="${homedir}/.ssh" > >if [ ! -d "${sshdir}" ]; then > echo "Skapar katalogen ${sshdir}" > mkdir "${sshdir}" > chown ${thisuser} "${sshdir}" > chmod 700 "${sshdir}" >fi > >ids=`/usr/local/bin/pkcs15-tool -c | awk '/ID :/{ print $3}'` >if [ -z "${ids}" ]; then > echo "Fel: hittar inga IDn på kortet" > my_exit 2 >fi > >authkeys="${sshdir}/authorized_keys" >for id in ${ids}; do > echo "Hämtar SSH-nyckel för id ${id} till ${authkeys}..." > /usr/local/bin/pkcs15-tool --read-ssh-key ${id} >> "${authkeys}" >done > >chown ${thisuser} "${authkeys}" >chmod 600 "${authkeys}" >my_exit 0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 2737
:
272
|
340
|
345
|
346
|
430
|
434