Luke, > From: Luke Kenneth Casson Leighton <lkcl@switchboard.net> > To: samba@samba.anu.edu.au > Subject: programming question, for samba. >Message-ID: <Pine.BSF.3.91.971009152807.9779I-100000@cb1-gw.cb1.com> > help, help. does anyone know of a generic way to convert string username into a uid (user id)? Put this in a script and make it executable: awk 'BEGIN{FS=":"} { if ($1 == name) print $3}' name=$1 /etc/passwd Works on almost every Unix flavour... regards, Rob den Boer