When I start smbd from Samba 2.05a on a Solaris 7 Ultra 5 box, I get the
following errors:
[1999/11/02 14:12:52, 3] smbd/server.c:main(680)
  loaded services
[1999/11/02 14:12:52, 3] smbd/server.c:main(688)
  Becoming a daemon.
[1999/11/02 14:12:52, 3] lib/util_sock.c:open_socket_in(898)
  bind succeeded on port 139
[1999/11/02 14:12:52, 2] smbd/server.c:open_sockets(183)
  waiting for a connection
[1999/11/02 14:12:54, 0] locking/shmem_sysv.c:sysv_shm_open(597)
  ERROR: root did not create the semaphore
[1999/11/02 14:12:54, 0] locking/locking.c:locking_init(174)
  ERROR: Failed to initialise share modes
[1999/11/02 14:12:54, 0] locking/shmem_sysv.c:sysv_shm_open(597)
  ERROR: root did not create the semaphore
[1999/11/02 14:12:54, 0] locking/locking.c:locking_init(174)
  ERROR: Failed to initialise share modes
How do I fix the errors?
--
==========================================================================Paul
McGauley-Caloca    Muy Cool Communications, LLC    WWW.MuyCool.ORG
        UNIX/Linux Systems, Networks, and Security Management
> -----Original Message----- > From: samba@samba.org [mailto:samba@samba.org]On Behalf Of Paul > McGauley-Caloca > Sent: Tuesday, November 02, 1999 11:17 PM > To: Multiple recipients of list SAMBA > Subject: Solaris 7 and shmem share modes error > > > > When I start smbd from Samba 2.05a on a Solaris 7 Ultra 5 box, I get the > following errors: > > [1999/11/02 14:12:54, 0] locking/locking.c:locking_init(174) > ERROR: Failed to initialise share modes > > How do I fix the errors?Just solved a similar problem on on our Solaris 2.6 boxes AND one our OSF1 boxes. Use ipcs -a to list information about your shared memory segments and active semaphores. Then use ipcrm to remove the ones causing trouble.
On Thu, 4 Nov 1999, Bill Eldridge wrote:> Urban Widmark wrote: > > Me too. You may want to try the included patch, apply from source/client/ > > Tried it, but no improvement :(Oh, I was pretty sure I had got it right.> [root@khiva rc3.d]# /usr/sbin/smbmount //cna/rxcna > /home/httpd/html/cna/rxcna -o guest,ro,ip=202.130.151.38 > Mounting CNA > execvp: No such file or directory^^^^^^ It could not find smbmnt as "BINDIR/smbmnt" so it tries to find it in your path. Do you have smbmnt in your path? /Urban
This will be fixed in 2.0.6, but in the meantime this
patch should tide you over.
Regards,
        Jeremy Allison,
        Samba Team.
---- /usr/people/jallison/tmp/samba-2.0.5a/source/locking/shmem_sysv.c  Tue Jul
20 18:25:11 1999
+++ locking/shmem_sysv.c        Tue Oct 12 17:30:16 1999
@@ -528,6 +528,7 @@
 /*******************************************************************
   open the shared memory
   ******************************************************************/
+
 struct shmem_ops *sysv_shm_open(int ronly)
 {
        BOOL other_processes;
@@ -536,6 +537,8 @@
        union semun su;
        int i;
        pid_t pid;
+       struct passwd *root_pwd = sys_getpwuid((uid_t)0);
+       gid_t root_gid = root_pwd ? root_pwd->pw_gid : (gid_t)0;
 
        read_only = ronly;
 
@@ -593,8 +596,9 @@
        hash_size = sem_ds.sem_nsems-1;
 
        if (!read_only) {
-               if (sem_ds.sem_perm.cuid != 0 || sem_ds.sem_perm.cgid != 0) {
-                       DEBUG(0,("ERROR: root did not create the
semaphore\n"));
+               if (sem_ds.sem_perm.cuid != 0 || ((sem_ds.sem_perm.cgid
!root_gid) && (sem_ds.sem_perm.cgid
!= 0))) {
+                       DEBUG(0,("ERROR: root did not create the semaphore:
semgid=%u, rootgid=%u\n",
+                  (unsigned int)sem_ds.sem_perm.cgid, (unsigned int)root_gid));
                        return NULL;
                }
 
@@ -684,7 +688,7 @@
        }
 
        if (!read_only) {
-               if (shm_ds.shm_perm.cuid != 0 || shm_ds.shm_perm.cgid != 0) {
+               if (shm_ds.shm_perm.cuid != 0 || ((shm_ds.shm_perm.cgid
!root_gid) && (shm_ds.shm_perm.cgid
!= 0))) {
                        DEBUG(0,("ERROR: root did not create the
shmem\n"));
                        global_unlock();
                        return NULL;
-- 
--------------------------------------------------------
Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.
--------------------------------------------------------