CUPS + passwd.md5 issue

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat CUPS + passwd.md5 issue
# 1  
Old 06-08-2012
CUPS + passwd.md5 issue

I posted the below question on the CUPS forums yesterday and have still not been able to find a good answer of why or if I can keep this from happening.

I have been looking for a while now and have still not found what I am looking for. Is there a way to allow multiple users to be updating the passwd.md5 file via the lpppasswd command? Everytime I make a change with user2 it overwrites the current user list that was made by user1. Also changes the ownership of the passswd.md5 file. Am I missing something or is there a way to allow multiple users to make changes that just update the file not overwrite the other users that were already in the digest file. Thanks in advance for help.
# 2  
Old 06-08-2012
How exactly are you using this command? Show what you're doing word for word, letter for letter, keystroke for keystroke.

How exactly is it mangling the data in the file? Is it removing other users or something? Explain the changes it's doing that it shouldn't be.

That the ownership of the file keeps changing is odd. lppasswd is generally a setuid executable, meaning, runs as root and does its own security checking instead. So the ownership of the file ought to be the same all the time -- root.
# 3  
Old 06-08-2012
I am using the following command to create users as part of the support group I created and am using in my cupsd.conf file. Everything works on the webgui the way I want so I am confident that is setup correctly. This is the syntax: /usr/bin/lppasswd -a -g support <username>. Both OS users that I have used to make changes are not the "Root" user but they both have lp as part of there groups. What happens is as follows. User1 will add user via lppasswd command above. That in turn changes the /etc/cups/passwd.md5 file ownership from root:lp to user1:lp. Then if I try and add a a user via lppasswd with user2 I overwrite the file and it moves what was in the file before to /etc/cups/passwd.old and now the ownership on the passswd.md5 file is user2:lp. Thoughts??? I have went through the cups documentation and have not found anything that is helpful.
# 4  
Old 06-08-2012
It must be replacing the entire file, every single time. Nothing intrinsically wrong with that; some commands use it as a way to prevent two programs writing to the same file simultaneously. The changing ownership shouldn't matter as long as everyone involved can read and write to the lp group. As I mentioned, lppasswd is usually a setuid executable, which is perhaps why this behavior usually isn't noticed -- it'd always create files belonging to its own owner, not the users who call it...

You still have not described how you try to add users, just say that you do, so I can't say whether the way you're using lppasswd is right or wrong.
# 5  
Old 06-08-2012
This is the syntax I use:

/usr/bin/lppasswd -a -g support user1

That is correct?

Last edited by linuxn00b; 06-08-2012 at 04:14 PM.. Reason: fixed syntax
# 6  
Old 06-08-2012
The information I have doesn't mention -s as an option for lppasswd.

I'm still not entirely clear on what your issue is. Are you complaining that when you add users, other users are removed?
# 7  
Old 06-08-2012
I meant -g no -s. Sorry to many things going on here. Syntax: lppasswd -a -g support user1. Yes, my issue is when I add users with user2, user1's users are removed from the passwd.md5 file.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to reverse the b64 format(encoded b64(b64(md5($pass)))) into md5 hash format?

I have about 1500 rows (encoded b64(b64(md5($pass))) algorythm) in a file. I would like reverse the b64 into md5 hash format. How could I do that from command line? So I need only the correct md5 hash formats. These row format: 4G5qc2WQzGES6QkWAUgl5w P9tKxonBOg3ymr8vOBLnDA... (1 Reply)
Discussion started by: freeroute
1 Replies

2. UNIX for Advanced & Expert Users

NTP time issue with md5 authentication.

Hi All Appreciate your help. Here is the scenario: 1. Five months back we configured md5 authentication with network devices and NTP server and it worked fine. 2.Last week all of a sudden the network devices are out of sync. 3.We changed the md5 key and it started working. ... (0 Replies)
Discussion started by: iqtan
0 Replies

3. Red Hat

CUPS print issue

Hi all, unable to print from linux box. Earlier it used to work fine. The print job is sitting in the queue and not going to printer. Removed queue job and tried again but no luck. Tried "cupsenable" but ended up with no success. I tried to print two text files as "root" with "lp " command... (0 Replies)
Discussion started by: lramsb4u
0 Replies

4. AIX

When did AIX start using /etc/security/passwd instead of /etc/passwd to store encrypted passwords?

Does anyone know when AIX started using /etc/security/passwd instead of /etc/passwd to store encrypted passwords? (1 Reply)
Discussion started by: Anne Neville
1 Replies

5. Shell Programming and Scripting

Create md5 sums and archive the resulting md5 files

Hello everyone, I am looking to basically creating md5sum files for all iso files in a directory and archive the resulting md5 files into a single archive in that very same directory. I worked out a clumsy solution such as: #find files for which md5sum are to be created and store the... (1 Reply)
Discussion started by: SurfTranquille
1 Replies

6. Shell Programming and Scripting

Issue in passing passwd to login into a sudo account

Hi Gurus, I have small issue... I used to pass the passwd for sudo commands like below, gzcat ~/passwd.gz | sudo su - <villin> >> eof ------ ----- ------ eof And it was able to login into "villin" sudo account successfully. But now, I'm using the same in another script for the... (2 Replies)
Discussion started by: raghu.iv85
2 Replies

7. Solaris

passwd cmd reenables passwd aging in shadow entry

Hi Folks, I have Solaris 10, latest release. We have passwd aging set in /etc/defalut/passwd. I have an account that passwd should never expire. Acheived by emptying associated users shadow file entries for passwd aging. When I reset the users passwd using passwd command, it re enables... (3 Replies)
Discussion started by: BG_JrAdmin
3 Replies

8. Linux

Need Help: MD5

I am trying to compare two identical files by using md5 command, but cant get the right command parameters Please help me with any examples. All I want is to know how to compare two identical files which are residing on two different machines in my local network, for example: Host_A -... (6 Replies)
Discussion started by: greenja
6 Replies

9. UNIX for Dummies Questions & Answers

MD5 missmatch

I think it's a problem of gtar, but i'm note sure... I use gtar to create an archive from a directory then i use md5 to get an md5 string for the archive bzip2 to compress the archive and md5 again for the compressed archive. I send the file to my backup machine. When i download the... (1 Reply)
Discussion started by: noratx
1 Replies

10. Shell Programming and Scripting

Md5

Does anyone know a scipt that includes MD5. I need to run a script that includes MD5 encryption. Thanks (1 Reply)
Discussion started by: duncang3
1 Replies
Login or Register to Ask a Question