HP T5725 Administrator's Guide: Linux-based HP Compaq t5725 Thin Clients - Page 77

Example B, gksudo or sudo to run the hpusers_app from an xterm if users

Page 77 highlights

Question How do I disable auto-logon for a non-root user account? Answer Example B 1. Log on as root and enable auto-logon for the user's account. 2. Copy one of the following auto-logon shell script to /usr/ bin/autologin to provide a 2 second pause before X starts: #1/bin/sh read -n l -t 2 -p "Stop autologin (y/n)? " RESULT if [ "$RESULT" = "y" ]; then /usr/X11R6/bin/wdm else /bin/login -f user fi If you want it to be completely silent, do not use the -p parameter. If you want to use the left Shift, the following should work: #!/bin/sh echo "Press left Shift key now to stop autologin." showkey -s -t 2 > /tmp/autologin; sync if [ `grep 0x2a /tmp/autologin` ]; then /usr/X11R6/bin/wdm else /bin/login -f user fi 3. Modify the auto-logon script for the user's name. In a Kiosk environment where users have a local password even though auto login is enabled on the client, you can also use gksudo or sudo to run the hpusers_app from an xterm if users have the "Access to system administration tasks" permission. Users could then user their own password when they need to use an administrative task. An example of what this allows could be the ability to create an "Other" connection in Connection Administrator with the following command: `/usr/bin/gksudo /usr/share/hp/panel/ hpusers_app` To discontinue auto-logon: ENWW Auto-logon/Auto-launch 69

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92

Question
Answer
How do I disable auto-logon for a non-root user account?
Example B
1
.
Log on as root and enable auto-logon for the user's
account.
2
.
Copy one of the following auto-logon shell script to /usr/
bin/autologin to provide a 2 second pause before X starts:
#1/bin/sh
read —n l —t 2 —p “Stop autologin (y/n)?
“ RESULT
if [ “$RESULT” = “y” ]; then
/usr/X11R6/bin/wdm
else
/bin/login —f user
fi
If you want it to be completely silent, do not use the
-p
parameter.
If you want to use the left
Shift
, the following should work:
#!/bin/sh
echo “Press left Shift key now to stop
autologin.”
showkey —s —t 2 > /tmp/autologin; sync
if [ `grep 0x2a /tmp/autologin` ]; then
/usr/X11R6/bin/wdm
else
/bin/login —f user
fi
3
.
Modify the auto-logon script for the user's name.
In a Kiosk environment where users have a local password even
though auto login is enabled on the client, you can also use
gksudo or sudo to run the hpusers_app from an xterm if users
have the “Access to system administration tasks” permission.
Users could then user their own password when they need to
use an administrative task. An example of what this allows could
be the ability to create an “Other” connection in Connection
Administrator with the following command:
`/usr/bin/gksudo /usr/share/hp/panel/
hpusers_app`
To discontinue auto-logon:
ENWW
Auto-logon/Auto-launch
69