home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / linux / 17265 < prev    next >
Encoding:
Text File  |  1992-11-19  |  5.5 KB  |  194 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!caen!destroyer!cs.ubc.ca!news.UVic.CA!sanjuan!pmacdona
  3. From: pmacdona@sanjuan (Peter MacDonald)
  4. Subject: Re: other problems - SLS .98.1 + patches 2-5
  5. Message-ID: <1992Nov20.020143.25872@sol.UVic.CA>
  6. Sender: news@sol.UVic.CA
  7. Nntp-Posting-Host: sanjuan.uvic.ca
  8. Organization: University of Victoria, Victoria B.C. CANADA
  9. References: <Bxw87p.Izx@shyguy.lonestar.org>
  10. Date: Fri, 20 Nov 92 02:01:43 GMT
  11. Lines: 181
  12.  
  13. In article <Bxw87p.Izx@shyguy.lonestar.org> bmyers@shyguy.lonestar.org (bob myers) writes:
  14. >I've just installed patches 2 through 5 on my SLS distribution; let
  15. >me give a quick run down on my hardware:
  16. >Tandy 4800HD (80486sx -20 mhz) laptop, 50 mb hard drive linux partition,
  17. >      10 mb dos 5.0 partition, 4 mb ram (within a week, will be at 8 mb).
  18. >
  19. >I'm seeing the following items now happening:
  20. >
  21. >1) upon boot with LILO, I'm not being asked if I'd like to select any
  22. >   svga modes, but yet the 4 options are displayed and then quickly passed
  23. >   over.  (i.e. no pausing to select the svga mode, but it does display the
  24. >   four offered).
  25. >
  26. >2) when I do a man of anything (and this also follows with some of the
  27. >   other commands/programs), I'm being warned about an old copy of stat()
  28. >   being used, and that I should recompile...but it still continues on
  29. >   with the execution (this is bothersome).
  30. >
  31. >3) when i try to issue a 'w' command, I get the following:
  32. >   'lseek kmem: Unknown error 127469004'
  33. >   this also happens when I try the ps command.
  34.  
  35. Upgrade to SLS 98.5 and the above will go away.  Read the HISTORY file to see what
  36. you need.  Note that the "rdev" command is expanded to set the video mode to 
  37. do what you say in 1).  That is, preselect the video mode for you.  Use "rdev -h"
  38. to see the help.
  39.  
  40. >
  41. >4) gnuchess gives a segmentation fault (running in normal mode; not in
  42. >   X386 mode).
  43. >
  44.  
  45. I don't have "gnuchess", so I haven't seen this.
  46. >any ideas?  i think I might have found one problem; the Makefile in the 
  47. >/usr/src/linux directory had two occurances for specifying the svga
  48. >choice.
  49. >
  50. >-bob
  51. >
  52. >
  53. >
  54. >-- 
  55. >----------------------------------------------------------------------
  56. >Bob Myers                        | Soooo many fields.....
  57. >2479 Deer Run #1305              |
  58. >Lewisville, Tx.  75067           |    Not enough waves....
  59.  
  60.  
  61. BTW:  Here is a fixed source for "adduser", which a number of people have
  62. complained about. 
  63.  
  64. Peter
  65.  
  66.  
  67. /* adduser : add a new user account          */
  68. /* Craig Hagan                               */
  69. /*                                           */
  70. /* pardon the kludge..written during         */
  71. /* commercials of star trek tng              */
  72.  
  73. #include <stdio.h>
  74. #include <string.h>
  75. #include <sys/stat.h>
  76. #include <unistd.h>
  77. #include <sys/time.h>
  78. #include <time.h>
  79.  
  80. #define PASSWD_FILE "/etc/passwd"
  81. /*#define DEBUG*/
  82.  
  83. char *crypt();
  84.  
  85. main()
  86. {
  87.   char foo[32],uname[32],person[32],passwd[32],dir[60],shell[60],line[100];
  88.   unsigned int group,uid;
  89.   int bad=0,done=0,correct=0;
  90.   char    salt[2];
  91.   time_t tm;
  92.  
  93.   FILE *passwd_file;
  94.  
  95.   while(!correct)
  96.     {
  97.       while(!done)
  98.     {
  99.       printf("Username to add: ");
  100.       fgets(uname,sizeof(uname),stdin); uname[strlen(uname)-1] = '\0';
  101.       printf("[%s]\n",uname);
  102.       passwd_file=fopen(PASSWD_FILE,"r");
  103.       while(!feof(passwd_file) && !bad)
  104.         {
  105.           fgets(line,100,passwd_file);
  106.           strcpy(foo,strtok(line,":"));
  107.           bad=!strcmp(foo,uname);
  108.         }
  109.       fclose(passwd_file);
  110.       
  111.       done=!bad;
  112.       
  113.       if(bad)
  114.         {
  115.           printf("That name is in use, choose another.\n");
  116.           bad=0;
  117.         }
  118.     }
  119.       
  120.       printf("%s's personal name : ",uname);
  121.       fgets(person,sizeof(person),stdin); person[strlen(person)-1] = '\0';
  122.       
  123.       bad=1;
  124.       while(bad)
  125.     {
  126.       printf("%s's group number: ",uname);
  127.       scanf("%d",&group);
  128.       fgets(foo,sizeof(foo),stdin); foo[strlen(foo)-1] = '\0';
  129.  
  130.       bad=group==0;
  131.       if (group==0)
  132.         {
  133.           printf("Give %s superuser privs? [y|n] : ",uname);
  134.           fgets(foo,sizeof(foo),stdin); foo[strlen(foo)-1] = '\0';
  135.           bad=((foo[0]!='Y')&&(foo[0]!='y'));
  136.         }          
  137.     }
  138.  
  139.       printf("\n%s's uid : ",uname);
  140.       scanf("%d",&uid);
  141.       
  142.       fgets(foo,sizeof(foo),stdin); foo[strlen(foo)-1] = '\0';
  143.  
  144.       printf("\n%s's home directory: [/home/%s] : ",uname,uname);
  145.       fgets(dir,sizeof(dir),stdin); dir[strlen(dir)-1] = '\0';
  146.       if (!strcmp(dir,""))
  147.     sprintf(dir,"/home/%s",uname);
  148.  
  149.       printf("Default dir is [%s] \n",dir);
  150.       
  151.       printf("%s's default shell : [/bin/sh] : ",uname);
  152.       fgets(shell,sizeof(shell),stdin); shell[strlen(shell)-1] = '\0';
  153.       
  154.       if (!strcmp(shell,""))
  155.     sprintf(shell,"/bin/sh");
  156.       printf("Default shell is [%s]\n",shell);
  157.       
  158.       printf("%s's defualt password : [%s] : ",uname,uname);
  159.       fgets(passwd,sizeof(passwd),stdin); passwd[strlen(passwd)-1] = '\0';
  160.       if (!strcmp(passwd,""))
  161.     sprintf(passwd,"%s",uname);
  162.  
  163.       {
  164.     
  165.     time(&tm);
  166.     salt[0] = (tm & 0x0f) +    'A';
  167.     salt[1] = ((tm & 0xf0) >> 4) + 'a';
  168.     
  169.       }
  170.   
  171.       printf("\n\nCreate user [%s]\n",uname);
  172.       printf("In directory, [%s],\n",dir);
  173.       printf("with [%s] as a default shell,\n",shell);
  174.       printf("and [%s], for a password.\n",passwd);
  175.       printf("\nIs this correct? [y|n] : ");
  176.  
  177.       fgets(foo,sizeof(foo),stdin); foo[strlen(foo)-1] = '\0';
  178.       done=bad=correct=(foo[0]=='Y'||foo[0]=='y');
  179.       
  180.     }
  181.  
  182.   printf("Making directory, [%s].\n",dir);
  183.   mkdir(dir,0700);
  184.  
  185.   passwd_file=fopen(PASSWD_FILE,"a");
  186.   fprintf(passwd_file,"%s:%s:%d:%d:%s:%s:%s\n"
  187.       ,uname,crypt(passwd, salt),uid,group,person,dir,shell);
  188.   chown(dir,uid,group);
  189.  
  190.  
  191. }
  192.   
  193.