Re: [Samba] .Xauthority SMB

2003-12-11 Thread Fredrik Tolf
Shannon Johnson writes:
  I'm mounting the home directories of the users upon login (using
  pam_mount) from the Windows server. However, none of the users can run X
  Windows. It says there's a problem with the .Xauthority file.

Would you mind posting the exact error message? I'm just curious,
because I don't think there should be any problems with xauth files on
SMB.

  I read that the .Xauthority and the .ICEauthority files can't exist
  on and SMB share, so I used environment variables and pointed them
  to /tmp.

What mechanism did you use to set the environment variables? PAM?

  Now, when the users try to start X (either through the GUI login,
  or from startx), it says the connection is refused by the
  server. Does anyone have any idea how I can work around this, or
  how I can fix it and still have the home directories mounted from
  the Windows server?

If you have only rebound the X authority file for the login process,
it's not very likely to work. When the display manager starts, it
creates an X authority cookie on the X server, and stores it in an
xauth file in a location that depends on the display manager. When the
user logs in, the display manager usually merges that cookie into the
xauth file in the user's home directory.

If you have only set the user's programs to check in /tmp instead,
they won't find the file that the display manager created, and thus
will not be able to authenticate themselves against the X server.

What display manager are you using?

Fredrik Tolf

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


RE: [Samba] .Xauthority SMB

2003-12-11 Thread Fredrik Tolf
Shannon Johnson writes:
   
   Would you mind posting the exact error message? I'm just curious,
   because I don't think there should be any problems with xauth files on
   SMB.
   
  
  Sure. From what I understand, the .Xauthority and .ICEauthority use hard
  links that don't work on any Windows-based filesystem, including SMB.
  The exact message is:
  
  xauth: error in locking authority file /home/users/username/.Xauthority

Oh, yes, that's right. It uses hard links for locking. I didn't know
that until I checked right now, actually. Thanks for telling me; I
learned something new. =)

   
   What mechanism did you use to set the environment variables? PAM?
   
  
  I put the following in the user's .bash_profile:
  
  XAUTHORITY=/tmp/.Xauthority
  export XAUTHORITY
  ICEAUTHORITY=/tmp/.ICEauthority
  export ICEAUTHORITY

I think it's fine for the ICE authority. As far as I know, it is
created by the session manager after login, so all programs should be
synchronized in that matter.

As for the X authority, however, that won't work, since the Display
Manager will still put the initial cookie in the user's home dir.

   What display manager are you using?
  
  I suppose it's gnome... it's the default under Red Hat 8, 9, and Fedora.
  I know the theme name is Bluecurve, but I don't know what the actual
  display manager is.

The default under RH (and Fedora) is gdm, yes.

In that case, edit /etc/X11/gdm/gdm.conf and change the UserAuthDir
line so that it reads UserAuthDir=/tmp. I think that should make it
work.

Fredrik Tolf

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


RE: [Samba] .Xauthority SMB

2003-12-11 Thread Fredrik Tolf
Shannon Johnson writes:
  I changed the Xsession file, and this is the result (and it's quite
  long):
  
  /etc/X11/gdm/PreSession/Default: Registering your session with wtmp and
  utmp
  /etc/X11/gdm/PreSession/Default: running: /usr/bin/X11/sessreg -a -w
  /var/log/wtmp -u /var/run/utmp -x /var/gdm/:0.Xservers -h  -1 :0
  test
  
  Xlib: connection to :0.0 refused by server
  Xlib: No protocol specified
  
  xsetroot:  unable to open display ':0'
  Xlib: connection to :0.0 refused by server
  Xlib: No protocol specified
  [...]
  Xlib: connection to :0.0 refused by server
  Xlib: No protocol specified
  
  (gnome-session:1604): Gtk-WARNING **: cannot open display:
  

That's interesting, and it beats me why I didn't think of that
before. It appears as if the X programs called from Xsession are
(were) able to connect to the X server, which means that XAUTHORITY
has to be set correctly when Xsession starts. Remove the export line
and replace it with echo $XAUTHORITY /tmp/xauth_log or something
similar to see where gdm has stored the cookie. If the file ends up
empty, that means that the file is in the user's home directory (which
does sound strange, yes), but as far as I know, gdm always sets
XAUTHORITY before forking Xsession, so that shouldn't happen.

  Another relatively minor problem (irritating, if nothing else) is the
  GUI login screen. It comes up with the password blank first, then
  username. I put in the username (test, in this case), then after it
  waits for a second or two, it asks for the password, and I enter it. It
  rejects it, then prompts me for the username again. This time, when I
  enter test, it immediately lets me in (skipping the password blank
  again). It may or may not have to do with my other problem, but I
  figured it was something I screwed up in my pam configuration.

That does sound really weird. I thought GDM was hardwired to ask for
the username first. That ruins my idea of how GDM works, so the only
thing I can think of right now to solve it is to download the source
for GDM and debug it.

Fredrik Tolf

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


[Samba] Login problems with printing services

2003-12-10 Thread Fredrik Tolf
I'm having slight troubles with making Windows clients print to a
printer shared through Samba running on GNU/Linux.

The symptoms are that clients must manually log in to the Samba
server before attempting to print. What I mean by this is that, if the
server's NetBIOS name is eg. sambaserv, the user must visit
\\sambaserv on his Windows workstation before attempting to
print. Print jobs initiated before this is done will not start
printing if \\sambaserv is visited afterwards (the most immediate
solution I have found is to restart the Windows workstation, visit
\\sambaserv, and then print again).

I suspect this might be a problem with Windows, but I don't know much
about either Windows, and not as much as I'd like about Samba either,
so I can't tell for sure.

Would someone please help me solve this?

Fredrik Tolf

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba