On Wed, 15 Dec 1999, Derek Simkowiak wrote: > > use getuid and then look that up in the /etc/passwd file. Not hard if you > > know what you're doing. > > Unless the system is using shadowed passwords. Won't matter. You are not trying to get the password, only the username. Both userid and name are in the file. > Is there no system call for this? getlogin() -- Alex (Go easy on me, I'm a COBOL programmer in real life)
- [expert] Determining current user in C Ivan J. Wagner
- RE: [expert] Determining current user in C Ian Douglas
- RE: [expert] Determining current user in C Derek Simkowiak
- RE: [expert] Determining current user in C Ian Douglas
- RE: [expert] Determining current user in C Davor Cengija
- Re: [expert] Determining current user in C Fabien Deschodt
- Re: [expert] Determining current user in ... Derek Simkowiak
- Re: [expert] Determining current user in ... Ivan J. Wagner
- Re: [expert] Determining current user in C Alex V Flinsch
- Re: [expert] Determining current user in C Christopher Cox