173be297 |
1 | .\" -*-nroff-*- |
ed36b0a2 |
2 | .TH ushell 1 "20 April 1999" "Local tools" |
3 | .SH NAME |
4 | ushell \- display a user's shell |
5 | .SH SYNOPSIS |
6 | .B ushell |
7 | .I user |
8 | .SH USAGE |
9 | Writes the named user's default shell to standard output. This is |
10 | useful in scripts sometimes. In particular, it's handy in global |
11 | .B xdm/Xstartup |
12 | scripts for checking whether users have sensible shells: |
13 | .sp 1 |
14 | .RS 5 |
15 | .nf |
16 | .ft B |
17 | SHELL=`ushell $USER` |
18 | case $SHELL in |
19 | */banned) |
20 | xmessage -file $HOME/.banned |
21 | exit 1 |
22 | ;; |
23 | *) |
24 | if ! grep -q "^$SHELL" /etc/shells; then |
25 | xmessage "You're not allowed to log in this way." |
26 | exit 1 |
27 | fi |
28 | ;; |
29 | esac |
30 | .fi |
31 | .ft R |
32 | .SH BUGS |
33 | None planned. |
34 | .SH SEE ALSO |
35 | .BR banned (8), |
36 | .BR chrootsh (8). |
37 | .SH AUTHOR |
38 | Mark Wooding (mdw@nsict.org) |