CHAP script file permissions - confused!

CHAP script file permissions - confused!

Post by Dave Esqu » Fri, 09 Jul 1999 04:00:00



Greetings from a newbie Windoze refuge! (the quotations below are to keep
myself organized, I know root is root and not "root")

After much mucking around, I have a technique to log into my MCIWorld CHAP
account. They (MCIWorld) said it couldn't be done - really they said we can't
help you, go away. Anyway...

I'm trying to let the "user" fire up a ppp script rather than having to be the
"root" all the time ( a bad idea, I think) and typing in a long complicated
/usr/bin/pppd /dev/tty... command to start my ppp session. Since this is a
standalone machine and I am the only person using the machine, I think its OK
for "user" to have access to PPP. All the ideas and scripts came from
axion.physics.ubc.ca/ppp-linux.html

my users: "root" and "dave"
my scripts: pppon and chatscript (both created as "root" user with emacs)

pppon script has a line: "/usr/sbin/pppd /dev/ttyS1 .... "chat -f
$HOME/chatscript"
and chatscript dials the ISP number and sets init strings to the modem.

Now the confusion, these are the commands (from the axion paper) to let other
users (hopefully "dave") access the pppon script:

1. mv pppon /usr/bin            : worked ok, file in /usr/bin  
2. chmod a+rx /usr/bin/pppon    : worked ok too, permission changed    
3. chown <user> chatscript        :here I substituted dave for <user>, worked ok
4. su <user>                      : I did su dave
                                : I checked and chatscript
                                : has the permissions "-rw-r--r-- dave root
chatscript"
5. mv chatscript $HOME  : ERROR message
                                : mv:cannot unlink 'chatscript': permission
denied
                                : mv: cannot remove 'chatscript': permission
denied
6. chmod go-rwx $HOME/chatscript        : never got to this command!

The way I understand this stuff (not very well obviously) is that as user
"dave" I should be able to type in a terminal window "pppon" and the whole
process should start.

I'm stuck, confused and very tired (but enjoying the learning curve!). What am
I doing wrong/setting permissions wrong or ... in line 5? The $HOME shell
variable thing is representative of /home/dave/? or something like that?

Getting closer every day and TIA,
Dave

 
 
 

CHAP script file permissions - confused!

Post by David Efflan » Sun, 11 Jul 1999 04:00:00



>Greetings from a newbie Windoze refuge! (the quotations below are to keep
>myself organized, I know root is root and not "root")

>After much mucking around, I have a technique to log into my MCIWorld CHAP
>account. They (MCIWorld) said it couldn't be done - really they said we can't
>help you, go away. Anyway...

>I'm trying to let the "user" fire up a ppp script rather than having to be the
>"root" all the time ( a bad idea, I think) and typing in a long complicated
>/usr/bin/pppd /dev/tty... command to start my ppp session. Since this is a
>standalone machine and I am the only person using the machine, I think its OK
>for "user" to have access to PPP. All the ideas and scripts came from
>axion.physics.ubc.ca/ppp-linux.html

I think you are going to much more trouble than necessary.  While I have
never done chap, I commonly do pap.  How to set up the connection depends
upon your Linux distribution.

RedHat has the nettool in X or linuxconf in the console that can set up a
ppp connection.  You can check a box to enable normal users to control the
connection.  I am guessing that it is just a matter of setting up a pap
connection and then working out the details of chap-secrets.  I have this
working using pap instead of chap (usernet in X or /sbin/ifup).

For other systems like Slackware it is a matter of making pppd suid
root (chmod 4750 pppd and chgrp users pppd), which 'man pppd' says it is
safe to do.  Then give users (or a particular group) permission to run any
related scripts.  pap-secrets and chap-secrets should only be readable by
root (or I think pppd will not use them).  I have done this in the past
using pap with their ppp-on (modified to use pap instead of login prompts).

Quote:>my users: "root" and "dave"
>my scripts: pppon and chatscript (both created as "root" user with emacs)

>pppon script has a line: "/usr/sbin/pppd /dev/ttyS1 .... "chat -f
>$HOME/chatscript"
>and chatscript dials the ISP number and sets init strings to the modem.

>Now the confusion, these are the commands (from the axion paper) to let other
>users (hopefully "dave") access the pppon script:

>1. mv pppon /usr/bin                : worked ok, file in /usr/bin  
>2. chmod a+rx /usr/bin/pppon        : worked ok too, permission changed    
>3. chown <user> chatscript    :here I substituted dave for <user>, worked ok
>4. su <user>                  : I did su dave
>                            : I checked and chatscript
>                            : has the permissions "-rw-r--r-- dave root
>chatscript"
>5. mv chatscript $HOME      : ERROR message
>                            : mv:cannot unlink 'chatscript': permission
>denied
>                            : mv: cannot remove 'chatscript': permission
>denied
>6. chmod go-rwx $HOME/chatscript    : never got to this command!

(snip)

--

http://www.de-srv.com/   http://cgi-help.virtualave.net/

 
 
 

1. File permissions/access and CHAP - confused newbie!

Greetings from a newbie Windoze refuge! (the quotations below are to keep
myself organized, I know root is root and not "root")

After much mucking around, I have a technique to log into my MCIWorld CHAP
account. They (MCIWorld) said it couldn't be done - really they said we can't
help you, go away. Anyway...

I'm trying to let the "user" fire up a ppp script rather than having to be the
"root" all the time ( a bad idea, I think) and typing in a long complicated
/usr/bin/pppd /dev/tty... command to start my ppp session. Since this is a
standalone machine and I am the only person using the machine, I think its OK
for "user" to have access to PPP. All the ideas and scripts came from
axion.physics.ubc.ca/ppp-linux.html

my users: "root" and "dave"
my scripts: pppon and chatscript (both created as "root" user with emacs)

pppon script has a line: "/usr/sbin/pppd /dev/ttyS1 .... "chat -f
$HOME/chatscript"
and chatscript dials the ISP number and sets init strings to the modem.

Now the confusion, these are the commands (from the axion paper) to let other
users (hopefully "dave") access the pppon script:

1. mv pppon /usr/bin            : worked ok, file in /usr/bin  
2. chmod a+rx /usr/bin/pppon    : worked ok too, permission changed    
3. chown <user> chatscript        :here I substituted dave for <user>, worked ok
4. su <user>                      : I did su dave
                                : I checked and chatscript
                                : has the permissions "-rw-r--r-- dave root
chatscript"
5. mv chatscript $HOME  : ERROR message
                                : mv:cannot unlink 'chatscript': permission
denied
                                : mv: cannot remove 'chatscript': permission
denied
6. chmod go-rwx $HOME/chatscript        : never got to this command!

The way I understand this stuff (not very well obviously) is that as user
"dave" I should be able to type in a terminal window "pppon" and the whole
process should start.

I'm stuck, confused and very tired (but enjoying the learning curve!). What am
I doing wrong/setting permissions wrong or ... in line 5? The $HOME shell
variable thing is representative of /home/dave/? or something like that?

Getting closer every day and TIA,
Dave

2. SSL, SSMTP: Information Request

3. pppd - PAP, CHAP, MS-CHAP, MS-CHAP-v2 protocol negotiation

4. number of open files per proces

5. QUESTION!: Confusing file permissions ...

6. html file association in 2.01

7. Confused about Pine and file permissions...

8. Manipulating PF filter rules from CUI

9. <chap 80> versus <chap 05>...?!?

10. Connecting pppd to NT server without chap/ms-chap

11. Howto dial ISP running NT4 - chap, pap, ms-chap?

12. Confused of Newbury, MySQL write permissions...

13. File permissions; Shell scripts