Openspool problem when changing /etc/passwd permissions


 
Thread Tools Search this Thread
Operating Systems HP-UX Openspool problem when changing /etc/passwd permissions
# 1  
Old 03-04-2009
Openspool problem when changing /etc/passwd permissions

My goal is to protect the /etc/passwd from unauthorized viewing. I wish ti change the permissions of the file to :

-r--r----- 1 root bin

so only root or accounts of the "bin" group could query this sensitive file. All our other processes have been ajusted to not need any info from /etc/passwd.

The spooladm user has "bin" as its primary group, and is running all the OpenSpool processes.

When I changed the permissions, the Openspool's "np" program called by regular users stopped working immediately, returning the error:

No OpenSpool realm default language is set, proceeding with C.
INTERNAL ERROR: get_path returns error.

If I run the "np" command under root, the commands executes successfully. I conclude that the process, under a regular user's context, can't read the /etc/passwd file.

I can't figure out how a workaround for that, because I don't know if it is the "np" command itself, or if it is from a forked sub-command.

Maybe there is a tweak in OpenSpool, anybody has an idea?

I really want to have those permissions set.
# 2  
Old 03-05-2009
I'm wondering myself on what's been done for protection.

Well Martin,

Do you see a comment on spooladm user in /etc/passwd?

If yes,

Un-comment it, shutdown the spooler and restart it.

-DB
# 3  
Old 03-05-2009
Statua of spooladm user in /etc/passwd

No, the user is not uncommented, in fact we use it to run npui, the OpenSpool management interface. Also, all spooler processes (queues and brokers) are ran under spooladm.

Because the user spooladm has access to the /etc/passwd file (because of "r--" bin group permission, we can use the "np" command successfully while logged under the spooladm account...

Other users that don't belong to the "bin" group can't print because they are obviously denied access the the /etc/passwd file. Why in the world the "np" process need access to that file ? My guess is it looks for the home directory of "spoolam", or the UID number. If there were an alternate way to provide this information (environment variable, or setting in Openspool or a config file), then I would be saved...!

I even tried to change permissions to 4555 on "np" (set sticky bit) so that the program would be run under the owner's (spooladm) context.

Does not work....
# 4  
Old 03-05-2009
Then you will end for users to see the main home directory like:
Code:
.
.
drwxr-xr-x   2 2070       users         1024 Dec 20  2004 bus
drwxr-xr-x   2 2066       users         1024 Mar  7  2005 calo
drwxr-xr-x   2 2017       users         2048 Jan 19 12:32 card
drwxr-xr-x   2 2018       users         2048 Oct 28 16:42 care
drwxr-xr-x   2 2005       users         1024 Jan 16  2006 carv
drwxr-xr-x   2 2019       users         1024 Mar  2 14:55 cas
drwxr-xr-x   2 2020       users         1024 Mar  4 16:31 cav
.
.

So anyone can guess the UID...
But then unless you are also in group bin, how will you identify alien files (true users files vs ftp or deleted account orphan files etc...)
And program which read /etc/passwd to see if you are entitled to changes in profile or env (usually in /etc/profile or ~user/.profile) will also fail...( you know like oracles "am I a DBA?")
# 5  
Old 03-05-2009
I understand what's your saying, but...

I understand, you think that is is a bad idea to not grant read authority to /etc/passwd. In fact, regular users are greeted with a menu of our application, they don't have access to the prompt.

Also, we don't have any program that rely on /etc/passwd entries anymore, I have ajusted in-house scripts accordingly. Everything runs fine but that stupid OpenSpool, which we can't get rid of at the moment.

I'm just trying to make the server safer to prevent stealing of the /etc/passwd file by a hacker.

So this thread is really specifically aimed at finding a solution for the "np" command being able to read the /etc/passwd without effiective permissions, or a workaround for getting the same information it is looking for.

I'm trying to get help from a OpenSpool guru, or a wise guy that faced the same challenge...

Thanks for the input, though.
# 6  
Old 03-05-2009
What model? (PA/itanium?) what OS version?
# 7  
Old 03-05-2009
environment specifics

server is PA-RISC, RP series, running HP-UX 11i. (11.11)

OpenSpool is B.01.60
This User Gave Thanks to MartinGravel For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Changing windows xp passwd doetn't change smbpasswd on server

Hi All we have small network which is in work group environment.We have one Samba server for sharing data on network.My Problem is when user change his/her password on windows machine i have to manually update his smb passwd on Samba server.I want password should change automatically on... (2 Replies)
Discussion started by: Vaibhav.T
2 Replies

2. Solaris

Impact on existing users when changing passwd defaults

Hi Administering Solaris Systems - Solaris 10 mostly. If I change the /etc/default/passwd settings - E.G. to increase minimum passwd length, then what happens to existing users with passwords shorter than this. presumably they are not affected until next time they want to change password. ... (4 Replies)
Discussion started by: Mudshark
4 Replies

3. UNIX for Dummies Questions & Answers

changing directory permissions

Hi, Im getting this annoying problem on file permission when I copy a folder to a mounted external directory. the files inside the copied folders become all executable. I tried to search for ways how to undo the permission over the web but to no avail. tried this one but it doesnt change a... (2 Replies)
Discussion started by: ida1215
2 Replies

4. Shell Programming and Scripting

Changing Passwd on Many servers that is not NIS

Hi Expert, I have environment where password is locally managed, not NIS, not LDAP, not Centrally managed. In order to access to this environment I have to use Jump Box, and only from jumpbox I can login to every host. I can't login direct from inside one host within that environment to... (1 Reply)
Discussion started by: regmaster
1 Replies

5. Shell Programming and Scripting

changing the permissions

HI, I wann give permissions to a folder which contains multiple folders..... how can i give permissions to all folder at a time tat means if i give permissions to main folder it the same permissions has to take on all the folders in the main folders how can i use one command to give... (1 Reply)
Discussion started by: nani1984
1 Replies

6. Shell Programming and Scripting

HELP changing file permissions

does anyone know how to write a script that will change file permissions. because the Admin blocked me from altering any of my files im only allowed to read and i heard a script like this can bypass it but i dont know how to write it. Display current users. Display user Ids only. Display... (10 Replies)
Discussion started by: live2learn
10 Replies

7. Solaris

Passwd Changing Acting Strange

Hello. I'm getting very odd behavior when I try to change a user's password in Solaris 8. The shell, where it used to ask for a new passwd and a confirmation, now asks FOUR times, with two success message. This is what happens every time: # passwd myusername New Password: xxxxxxxx New... (2 Replies)
Discussion started by: rockusa
2 Replies

8. Solaris

problem in changing the NIS passwd

Now I face a problem in changing the NIS passwd,I have no idea,want you to help me! Today I add some user in the NIS master server ,I "vi" /etc/passwd &/etc/shadow,add user account and password by hand(shadow----no password ,only eight ":"). when finsh,I login ,system told me to input a password... (3 Replies)
Discussion started by: dlsjm
3 Replies

9. UNIX for Advanced & Expert Users

Changing permissions of a user

So I need to change the permissions of my user account. I can access the root account on the server, but don't know how to change the permissions of my user account. I was advised to try 'userconf' to see if I am part of a group, but I dunno how that works. ANyone who knows how to see the... (3 Replies)
Discussion started by: achink125
3 Replies

10. Shell Programming and Scripting

Changing Permissions

Is it possible to change the permissons for an entire directory in one shot? I'm telneting on to a linux server. ...just a beginner-- --Paul (4 Replies)
Discussion started by: pdavid
4 Replies
Login or Register to Ask a Question