LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-13-2009, 03:58 AM   #1
fredheeks
LQ Newbie
 
Registered: Jan 2009
Location: Rossendale, UK
Distribution: Fedora
Posts: 5

Rep: Reputation: 0
Showing the Windows user when printing to CUPS on Linux


I have a Fedora server running SAMBA and CUPS and can successfully print my jobs from various Windows machines to the Linux box.

I display a custom banner page showing various bits of information, including the username of the person originating the job.

What I want to know is; is there any way to display the Windows user on the banner, WITHOUT having to join the Linux machine to the various Windows domains?

I don't need to authenticate the users or anything like that, simply showing the username would be sufficient.

All the banner shows for the Windows users is 'root'.
 
Old 01-13-2009, 04:23 PM   #2
colonboy
Member
 
Registered: Dec 2005
Location: Prior Lake, MN
Distribution: Fedora, Suse, Mandriva, Ubuntu
Posts: 35

Rep: Reputation: 15
fredheeks,

the files that are being printed - are they local files to the windows machine or files accessed from this server via Samba. If the latter, is the user required to authenticate when trying to access a directory on the Linux box?

colonboy
 
Old 01-14-2009, 01:23 AM   #3
fredheeks
LQ Newbie
 
Registered: Jan 2009
Location: Rossendale, UK
Distribution: Fedora
Posts: 5

Original Poster
Rep: Reputation: 0
There are both local and remote files being printed. The local files show the username correctly as the local account that has printed them. However, the remote files just show the user as root.

The remote files are being printed from a Windows XP box to the printer, added as a 'new network printer' on the XP box by simply browsing to the Linux server from the 'Add a new printer wizard'. I have set up Samba to use cups as the printing system so all the printers configured on the Linux box are visible to other machines.

The Windows machines can all print to the box quite happily at the moment, with no authentication specified in the /etc/cups/cups.conf file.

I'm not sure how I would set up the authentication as there are a number of Windows machines on different domains, some on workgroups that all need to print to this Linux server.

I was hoping that I could just leave the printing as unauthenticated, therefore allowing everyone to print, but just log who was printing what. I can obtain the IP address of the machine printing. I just expected that the username would be available somehow as well.
 
Old 01-14-2009, 07:08 PM   #4
colonboy
Member
 
Registered: Dec 2005
Location: Prior Lake, MN
Distribution: Fedora, Suse, Mandriva, Ubuntu
Posts: 35

Rep: Reputation: 15
Are the remote files located on a Linux box running Samba? If so, would you post your smb.conf file (snipping any confidential info)? I'm curious to see what your "server" line is (eg. security = share). On my remote files located on Linux running Samba, users have to authenticate when trying to access any of the files. This would not be the case if smb.conf has security = share, so it may access those files as root. This isn't my knowledge, just my thought. With the information you have provided as well as a look at the smb.conf file, someone on this forum should be able to provide assistance.

colonboy
 
Old 01-15-2009, 05:16 AM   #5
fredheeks
LQ Newbie
 
Registered: Jan 2009
Location: Rossendale, UK
Distribution: Fedora
Posts: 5

Original Poster
Rep: Reputation: 0
The Fedora box is running Samba and cups.
There are a number of printers configured and shared out on this box.
There are also some file shares.
Windows users on XP machines can access the shares (with a suitable username and password) and can print to the shared printers without any authentication.

This is all working fine, as I want it. The only thing I need is to be able to determine the identity of the Windows users when they print their files.

If a Linux user logged on to the box prints a file then the banner I have configured correctly shows their username. If a Windows user remotely prints a file to one of the shared printers then their username is shown as 'root'.

I haven't got access to the box today to be able to post up the smb.conf but I know that the security is set to user.

I strongly suspect that the only way to do this is going to be to join the Linux box to the Windows domain in order to enumerate the Windows users.

I really didn't want to do this though and was hoping that perhaps somewhere in the print job or in the IPP communication from the Windows clients to the Linux server that the username might be held somewhere that I could pick up and display, without having to authenticate against it.
 
Old 01-15-2009, 07:34 PM   #6
colonboy
Member
 
Registered: Dec 2005
Location: Prior Lake, MN
Distribution: Fedora, Suse, Mandriva, Ubuntu
Posts: 35

Rep: Reputation: 15
I don't think you would have to join the Linux box to the domain, but I would think the user, when on his/her Windows box would have to authenticate to the Linux box when accessing a share on that Linux box (provided security = user), unless permission is set for everyone to access the share. I'll try to do some testing when I get to my Linux boxes.

colonboy
 
Old 01-19-2009, 06:12 AM   #7
colonboy
Member
 
Registered: Dec 2005
Location: Prior Lake, MN
Distribution: Fedora, Suse, Mandriva, Ubuntu
Posts: 35

Rep: Reputation: 15
Had problems getting back to you as I kept getting server error when trying to get onto linuxquestions.org. Anyway, when I set security to user in smb.conf, and I try to access a Linux share from my Windows box, I'm prompted for credentials. Were you able to find anything else on yours?

colonboy
 
Old 01-20-2009, 01:25 AM   #8
fredheeks
LQ Newbie
 
Registered: Jan 2009
Location: Rossendale, UK
Distribution: Fedora
Posts: 5

Original Poster
Rep: Reputation: 0
I'm not talking about Windows users accessing shares; that works fine and they get prompted for a username/ password.

I'm talking about printing... Windows users printing to a Linux box runnning cups.

Once a Windows user has installed the printer (by browsing to the Linux box and selecting the printer. I.e. in the 'Add a new printer' wizard they add a new network printer and then browse to the linux box with \\LinuxBox\ and all the printers are displayed and automatically installed once one is chosen as I have installed the Windows drivers on the Linux box), then they can just print to that printer like any other printer. There is no browsing to a share, no further authentication is required.

I just want to know the domain/username of the Windows user that submitted the job.

Just to re-iterate, this is not Windows users trying to log on to the Linux server, or browse a share, or anything like that. They are simply submitting print jobs to a printer that happens to be accessed via the Linux box.
 
Old 01-21-2009, 08:54 PM   #9
colonboy
Member
 
Registered: Dec 2005
Location: Prior Lake, MN
Distribution: Fedora, Suse, Mandriva, Ubuntu
Posts: 35

Rep: Reputation: 15
My mistake. I was in the mindset that the print job pulled user info from the file being printed. Maybe someone can come up with an answer quicker, but I'll keep looking into it because I'd like to know the resolution also. I'll keep you posted on my progress.

colonboy
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing to windows from linux: CUPS wont load Maverick1182 Linux - Newbie 4 09-18-2006 08:01 AM
CUPS / Windows to Linux Printing Centinul Linux - Networking 15 07-21-2006 10:53 PM
SAMBA & CUPS (Linux & Windows Printing) xcythe Linux - Networking 4 06-12-2005 11:46 AM
Problem with networked printing with CUPS-- hostname showing up where it shouldn't pingswept Linux - General 1 06-29-2004 09:38 PM
Incorrect file and user names while printing via CUPS marcello Linux - Networking 0 07-31-2003 07:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration