Unexpected Result in adduser

Unexpected Result in adduser

Post by Gene J. Raymo » Sat, 13 May 1995 04:00:00



I noticed the following "quirk" the other night when setting up some
new accounts with adduser.  One of the fields requests the GID for the
new account with a default value of 100.  If you type another value,
it is accepted at that point, but when adduser prompts "Is this correct?",
the presented GID is always 100 and is always written to /etc/passwd as
100.  As a result, every time I want to set up an account whose primary
group is not 100, I have to manually edit /etc/passwd.  Is there a newer
version of adduser available or perhaps suggestions for better handling
this situation?  This adduser is the one which I received with the A set
of the Linux 1.1.59 Slackware distribution.

--

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*


GJR Software Products                
PO Box 3416                           Se habla espanol.
Merrifield, VA 22116-3416             On parle francais.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*

 
 
 

1. unexpected fork()/ppid() results!

Hello!

I am trying to understand (maybe develope something later) how processes
-manipulation works. So I wrote this small progam yesterday which
immediately results in things I can't explain.

---- the program ----
#include <unistd.h>

void main(void)
{
  pid_t         pid;

  printf("%04d : uid=%d, gid=%d, euid=%d,
egid=%d\n",getpid(),getuid(),getgid(),geteuid(),getegid());

  pid = fork();
  if (pid == 0)
     printf("%04d : My Daddy is %d.\n",getpid(),getppid());
  else
     printf("%04d : Me Daddy of %d! (and son of
%d)\n",getpid(),pid,getppid());
---- end of program ----

It compiles cleanly but when I run it:

neptunus:/home/benc/sources# a.out
16499 : uid=0, gid=0, euid=0, egid=0
16499 : Me Daddy of 16500! (and son of 12893)
neptunus:/home/benc/sources# 16500 : My Daddy is 1.

Why does the child think it's ppid is 1 and not 16499 like I expected?
The 16499 seems to know it's
parent (a bash) using the same function call.

I hope someone can give me some answers. It doesn't have much sense
going on developing if I can't even explain this..

Thanks in advance,
Ben

2. lpNet problems..

3. RWBoolean : unexpected result

4. HELP on AFS

5. csh script - unexpected results? (BSDI)

6. Keyboard problem with Red Hat 6.1

7. CTRL-ALT-+ : unexpected results switching color depths

8. usb problems

9. NFS newbie getting unexpected results [long]

10. Unexpected result from grep

11. CASE Statement - Weird and Unexpected Results

12. Newbie--ipchains unexpected results

13. Script run via cron yields unexpected results.