[news.newusers.questions] Another question 'bout .signature files

matthews@umd5.umd.edu (Mike Matthews) (01/11/90)

With all of this talk about .signature files, I have another question about
them.

What do you have to do to have one?  I have the .signature file in my root/
home directory (~/), and it works for mail, but I keep getting an error when I
try to use it with rn; something about inews has to see it.

Would making the file an executable do this? (I'm not a beginner to Unix, but
I still have an AWFUL lot to learn)

Thanks for any suggestions (or flat out answers <grin>).

Mike

subbarao@phoenix.Princeton.EDU (Kartik Subbarao) (01/11/90)

In article <5911@umd5.umd.edu> matthews@umd5.umd.edu (Mike Matthews) writes:
>With all of this talk about .signature files, I have another question about
>them.
>
>What do you have to do to have one?  I have the .signature file in my root/
>home directory (~/), and it works for mail, but I keep getting an error when I
>try to use it with rn; something about inews has to see it.
>
	Make the file readable to all -- i.e.,

	chmod 644 .signature should do the trick

			-A fellow UNIX learner,
			 Kartik Subbarao


-- 
subbarao@{phoenix,bogey or gauguin}.princeton.edu
"A penny saved is a penny earned -- so a dollar saved is a dollar earned.
 But what's the use of earning a dollar? 25 cents goes to the IRS!
 I say SPEND IT!"		-original

weave@sun.acs.udel.edu (Ken Weaverling) (01/11/90)

In article <5911@umd5.umd.edu> matthews@umd5.umd.edu (Mike Matthews) writes:
>
>What do you have to do to have one?  I have the .signature file in my root/
>home directory (~/), and it works for mail, but I keep getting an error when I
>try to use it with rn; something about inews has to see it.
>

In article <12839@phoenix.Princeton.EDU> subbarao@phoenix.Princeton.EDU (Kartik Subbarao) replies:
>
>	chmod 644 .signature should do the trick
>
Make sure your home directory is also readable, else inews can't even get
to your .signature to read it...
 
	chmod 711 .
(Thars a period there dudes...)

-- 

Ken Weaverling - Systems Administrator |  Internet: 00499@vax1.acs.udel.edu
Delaware Technical & Community College |  Voice:    +1 302 573 5460

matthews@umd5.umd.edu (Mike Matthews) (01/12/90)

In article <6650@sun.acs.udel.edu> weave@sun.acs.udel.edu (Ken Weaverling) writes:
>In article <12839@phoenix.Princeton.EDU> subbarao@phoenix.Princeton.EDU (Kartik Subbarao) replies:
>>
>>	chmod 644 .signature should do the trick
>>
>Make sure your home directory is also readable, else inews can't even get
>to your .signature to read it...
> 
>	chmod 711 .
>(Thars a period there dudes...)
>
>Ken Weaverling - Systems Administrator |  Internet: 00499@vax1.acs.udel.edu
>Delaware Technical & Community College |  Voice:    +1 302 573 5460

Well, it worked before.  I did both chmod 644 .signature and chmod 711 .;
and I got the error again.  I did a listing of all my files, and my path and
the sig file are readable by all.  The exact error message, for what it's worth,
is:
inews: "/usr/users/fisrtaid/matthews/.signature" left off (must be readable by
"inews" owner)

The inews owner must be illiterate... I'll try one other thing (ignoring num-
bers and using switches instead) before I give up..

While I'm here, thanks to all who responded.  Some people's mail bounced back,
so here's the thank you.

Mike Matthews, matthews@umd5.umd.edu [this ain't the .sig file]

georgemartin@hodgenet.UUCP (George H. Martin) (01/12/90)

In article <5911@umd5.umd.edu> matthews@umd5.umd.edu (Mike Matthews) writes:
>With all of this talk about .signature files, I have another question about
>them.
>
>What do you have to do to have one?  I have the .signature file in my root/
>home directory (~/), and it works for mail, but I keep getting an error when I
>try to use it with rn; something about inews has to see it.
>

If your $HOME directory NOT mode 0777, you'll have to make the code in inews.c
at line 1342+ look like this:


		(void) sprintf(bfr, "%s/%s", userhome, ".signature");
		if (access(bfr, 4) == 0) {
			setuid(uid);
			infp = fopen(bfr, "r");
			setuid(duid);
			if (infp == NULL) {
				(void) fprintf(stderr,
    "inews: \"%s\" left off (must be readable by \"inews\" owner)\n", bfr);


The original coding is:

		(void) sprintf(bfr, "%s/%s", userhome, ".signature");
		if (access(bfr, 4) == 0) {
			if((infp = fopen(bfr, "r")) == NULL) {
				(void) fprintf(stderr,
    "inews: \"%s\" left off (must be readable by \"inews\" owner)\n", bfr);

The fopen fails if the uid is not yours (it is the 'news' uid in your password
file probably). Anyway it fails because the directory doesn't allow the action.
This is preferable to having a wide open directory. This caused the message on
my system about 'readable by inews owner' in the code above. Maybe its your
problem too.


-- 
George H. Martin
uunet!hodgenet!georgemartin
Homer Dodge Network Systems, Inc.
+1 201 454 3333

kv56962@tut.fi (V{{r{nen Kari) (01/14/90)

In article <224@hodgenet.UUCP> georgemartin@hodgenet.UUCP (George H. Martin) writes:


>If your $HOME directory NOT mode 0777, you'll have to make the code in inews.c
>at line 1342+ look like this:


I think 0755 is enough. Do NOT change your home directory's mode to
777 if you want to keep others out of your account!!!!!



--
	SO LONG AND THANKS FOR ALL THE FISH	(The dolphins)
Kari Vaaranen                                 Tampere University of Technology
Majakkakatu 30,                                                 kv56962@tut.fi
SF-33410 Tampere, FINLAND             (These opinions are mine and mine ONLY!)