[ILUG] passwd from gui?
Mark Finlay
linuxexpert at eircom.net
Sat May 25 17:09:23 IST 2002
I've written a script (included) to add users to a nfs server
but I would prefer not to have to open up a console every time i use it
(it's for a windows convert who is intimidated by consoles) and would
prefer to use gdialog or something similar, like this:
user=`gdialog --title "Username" --inputbox "Username: " 200 100 ""
2>&1`
password1=`gdialog --title "Password" --inputbox "Desktop:" 200 100
"gnome" 2>&1`
password2=`gdialog --title "Confirm" --inputbox "Desktop:" 200 100
"gnome" 2>&1`
but how do I pass $password to passwd without having to type in the
password at the command line?
or is there a simple gui password changing dialogue?
__________________________________________
#!/bin/bash
stty erase ^H
clear
echo -n "Username: "
read user
useradd $user -d /home/$user -m
passwd -q $user
echo ""
echo "-------------"
echo "Sharing new user with network"
cd /var/yp
make > /dev/null
/etc/init.d/ypserv restart > /dev/null
chmod 700 /home/*
echo "Done. Press ENTER to continue."
read stuff
___________________________________________
--
Mark Finlay
"sisob's linux eXPerience"
http://sisob.dyndns.org
Registered Linux User: #243436
More information about the ILUG
mailing list