Welcome to the "samba" mailing list

MCCALL,DON (HP-USA,ex1) don_mccall at hp.com
Wed Nov 29 10:03:42 GMT 2000


If this happens every time you bring up samba, it may be 
due to the shared memory and semaphores already existing
when Samba tries to create them, and them being owned by
the 'wrong' unix user or group. I wrote a brief article about
this phenom. a while back, perhaps it will help:

**********
Samba can fail to run with the following error message: 


ERROR: root did not create the semaphore: semgid=1, rootgid=3 
error railed to initialize shared moded. 
failed to initialize shared memory. 


startsmb will seem to work, but when you try to do a smbstatus, you will 
get this error. 


The cause of the problem is that at some point in the past, Samba was 
started 
by a root user when the home gid for the root account was DIFFERENT than the



current home gid for root. Samba does not remove the shared memory or 
semaphores 
it uses to access shared memory when you bring it down, and always tries to 
use 
existing shared memory and semaphores if it finds them. When it finds that 
the 
semaphore it is using was created with a different gid than the current root

home 
gid, it fails to initialize. This could happen on some systems with special 
security 
or where the customer uses a special program (like .do) to switch from a 
normal user 
to a user with root privileges. 


The shared memory and semaphore keys that Samba uses are: 
shared mem key = 0x00280267 
semaphore key = 0x00280269 


Fortunately, the solution to this problem is simple. 
Shut down samba (stopsmb) 
and remove the shared memory and semaphores: 


ipcrm -M 0x00280267 
ipcrm -S 0x00280269 


Then start Samba (smbstart) while logged in as root.
*********************
Hope this helps...
don 



-----Original Message-----
From: marcel.czink at gmx.net [mailto:marcel.czink at gmx.net]
Sent: Tuesday, November 28, 2000 10:30 AM
To: samba at lists.samba.org
Subject: Re: Welcome to the "samba" mailing list


i got the following problem:
[root at sun samba]# tail log.smb
[2000/11/28 16:20:16, 0] locking/locking.c:locking_init(174)
  ERROR: Failed to initialise share modes
[2000/11/28 16:20:29, 0] locking/shmem_sysv.c:sysv_shm_open(667)
  Can't create or use IPC area. Error was Die Datei existiert bereits
[2000/11/28 16:20:29, 0] locking/locking.c:locking_init(174)
  ERROR: Failed to initialise share modes
[2000/11/28 16:20:29, 0] locking/shmem_sysv.c:sysv_shm_open(667)
  Can't create or use IPC area. Error was Die Datei existiert bereits
[2000/11/28 16:20:29, 0] locking/locking.c:locking_init(174)
  ERROR: Failed to initialise share modes
[root at sun samba]# 

i dont know what to do.
linux 2.2.16/samba 2.0.7
can anyone help me?

thnx
marcel


-- 
Sent through GMX FreeMail - http://www.gmx.net





More information about the samba mailing list