File: change_default_shell

package info (click to toggle)
gforge 4.5.14-22etch13
  • links: PTS
  • area: main
  • in suites: etch
  • size: 13,004 kB
  • ctags: 11,918
  • sloc: php: 36,047; sql: 29,050; sh: 10,538; perl: 6,496; xml: 3,810; makefile: 341; python: 263; ansic: 256
file content (9 lines) | stat: -rwxr-xr-x 228 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
#!/bin/sh
if [ $(id -u) != 0 ] ; then
    echo "You must be root to run this, please enter passwd"
    exec su -c "$0 $1"
fi

su -s /bin/sh gforge -c psql gforge <<-FIN
ALTER TABLE users ALTER COLUMN shell SET DEFAULT '$1';
FIN