[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: alsaconf and printing



On Mon, Oct 29, 2007 at 17:31:08 -0000, Ed wrote:
> On Sun, 28 Oct 2007 14:50:10 +0100, Florian Kulzer wrote:
> > On Sun, Oct 28, 2007 at 00:02:56 -0000, Ed wrote:

[...]

> >> The 2nd problem is with printing.  I have my printer connected to
> >> another computer on my home network that is running samba.  On the
> >> debian computer, I choose Desktop->Administration->Printing and Add
> >> Printer.  I then follow all the screens (for windows printer (smb)) and
> >> it appears everything is fine. It sees my network and the computer the
> >> printer is connected to and all seems well until I get to the last
> >> screen.  When I hit Apply, this windows closes, and only the original
> >> Add printer window is open with no new printer icon.  I am not sure
> >> what is happening here. Other computers on my home network print fine
> >> through the samba server.
> > 
> > Check if the file /etc/cups/printers.conf exists; if it does exist then
> > you should post it here so we can have a look. WATCH OUT: This file can
> > contain clear-text usernames and passwords! Change those to generic
> > placeholders ("USERNAME", "PASSWORD") before posting the file.

[...]

> Now for the printing problem. I do have a file named /etc/cups/
> printers.conf but it has no contents. 

Something went wrong with the print manager if this file is empty.

> This 'may' be related to another 
> problem I just discovered.  If I log out of my user account and attempt 
> to log in with user name root and my root password, it won't let me.

This is normal if you are using the graphical login for X/Gnome. Root
login for X is disabled by default because it is a security risk. To try
your root login, press and hold both CTRL and (left) ALT, then press F1.
This should take you to a text terminal where you can log in as root.
You can switch between terminals and graphical environment at any time
like this; you don't even have to log out to do it. (The terminals are
F1 to F6 and the graphical environment is F7.) To log out at the text
terminal again, type "exit" (without the quotes) and press ENTER.

> It 
> keeps re-displaying the enter user name screen.  If I log in as a user, 
> and then issue a command with sudo in front of it, it asks for the 
> administrative password and I enter my root password that I entered 
> during the install process and it says invalid password please try 
> again.

This is normal, too; sudo wants your user's password and not the one of
root. The purpose of sudo is to give someone the ability to run certain
commands as root without telling him/her the root password. (If this
person knows the root password then there is no control what he/she can
do to the system.) This is handy if a system is administered by several
persons with different tasks; each one of them can only do what they are
supposed to do and all sudo activity is logged.

The /etc/sudoers file determines which user can use which command with
sudo. (I don't recall what the Debian default is here; I customized my
sudoers file long ago.)

> However, if I log in as a user, and then type su, when it asks 
> for password, I enter the same root password and it takes it.

This is also normal; "su" will really make you root and you can do
whatever you like on the system, therefore you have to know the root
password to use it.

>                                                                Getting 
> back to the printer, if I look at /var/log/cups/error.log - it says date-
> time--0400 CUPS-Add-Modify-Printer Unauthorized.

I think the first thing to do is to add your user to the "lp" and the
"lpadmin" group, then you will be able to print and to add printers as
your normal user. The command for this is

adduser USERNAME lp
adduser USERNAME lpadmin

You have to run this as root and then you can check your success with

groups USERNAME

Afterwards you have to log out and in again to make the change
effective.

> Not sure what to do about any of this.  I thought I was very careful when 
> I did the initial install to enter twice the password I wanted for root, 
> and I'm quite sure I am entering that same password now.
> 
> So - 'maybe' the inability to set up cups printing to my samba printer is 
> somehow related to the root or administrative password irregularity. I 
> notice that printers.conf is owned by root and the group is lp.  Only 
> root can write to it.

I think there was a problem with your print manager. This may be
resolved by adding your user to those two groups, so you can simply try
again. If that fails you can also try the CUPS HTML frontend

http://localhost:631/

which can be accessed using any browser. Keep in mind that you will have
to provide two different sets of credentials: First you need username
and password for the print server, so that CUPS can authenticate you
whenever you print something, and then you need your local username and
password (or the one of root) because the cups daemon needs to modify
printers.conf. Cupsd can write to this file and it will accept your
normal credentials if you are member of the lpadmin group.

Post again if you get stuck; in the worst case we will simply give you a
working printers.conf for smb authentication (in which you will only
have to put your printer server, username and password) and tell you how
to install the driver manually.

-- 
Regards,            | http://users.icfo.es/Florian.Kulzer
          Florian   |



Reply to: