[Lias] Script help needed
Simon Bryan
sbryan at olmc.nsw.edu.au
Fri Nov 7 05:34:04 UTC 2003
Hi all,
At the moment I have a acript which accepts the username and password from the
command line and uses sudo mount .... to map users home directories from the real
server to a sub-directory in their home directory on our LTSP server. This works
fine, but has a couple of problems:
1. It has to be run from the command line
2. The username and password are typed n clear text on the screen
Is it possible to modify this so that it can be run by double-clicking in the GUI
and have it ask for Username and Password (and hide the password as it is typed?)
The script looks like (NOte that this was put together by others I have no scripting
skills - myu contribution was the sudo mount line):
#!/bin/sh
if [$# -ne 2]; then
printf "Requires 2 arguments: $0 <username> <password>\n"
exit 1
fi
[ -a /home/$1/$1] || mkdir -p /home/$1/$1
sudo mount -t smbfs -o username=$1,password=$2,posix=0uid=$1.gid=$1umask=0077
//10.192.0.14/homes /home/$1/$1
____________________
Simon Bryan
IT Manager
OLMC Parramatta
More information about the lias
mailing list