help, help. does anyone know of a generic way to convert string username into a uid (user id)? luke <a href="mailto:lkcl@switchboard.net" > Luke Kenneth Casson Leighton </a> <a href="http://mailhost.cb1.com/~lkcl"> Lynx2.7-friendly Home Page </a> <br><b> "Apply the Laws of Nature to your environment before your environment applies the Laws of Nature to you" </b>
On Thu, 9 Oct 1997, Luke Kenneth Casson Leighton wrote:> help, help. does anyone know of a generic way to convert string username > into a uid (user id)?the answer to my own question is: Get_Pwnam() in samba - an upper/lower etc case wrapper around man (3) getpwnam(). luke <a href="mailto:lkcl@switchboard.net" > Luke Kenneth Casson Leighton </a> <a href="http://mailhost.cb1.com/~lkcl"> Lynx2.7-friendly Home Page </a> <br><b> "Apply the Laws of Nature to your environment before your environment applies the Laws of Nature to you" </b>
Luke Kenneth Casson Leighton wrote:> > help, help. does anyone know of a generic way to convert string username > into a uid (user id)? >How about... grep username /etc/passwd|cut -f 3 -d : -James
> help, help. does anyone know of a generic way to convert string username > into a uid (user id)? > > lukeAssuming you are on the Unix side? Try getpwnam(). Look at the man pages on this for related functions. j- -- ________________________________________________________________________ Gerald ( Jerry ) Carter Engineering Network Services Auburn University jerry@eng.auburn.edu http://www.eng.auburn.edu/users/cartegw "...a hundred billion castaways looking for a home." - Sting "Message in a Bottle" ( 1979 ) ________________________________________________________________________