home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.os.linux.mandriva      Somewhat decent but also getting bloated      29,919 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 29,253 of 29,919   
   unruh to Jim Beard   
   Re: Cannot get my 3G Wireless internet c   
   03 May 13 15:38:41   
   
   From: unruh@invalid.ca   
      
   On 2013-05-03, Jim Beard  wrote:   
   > On 05/03/2013 09:20 AM, Daniel47@teranews.com wrote:   
   >> Yeap, let me try again......   
   >>   
   >> ls -l /daniel/ gives a full list, including   
   >>   
   >> -rwxr-xr-x  1 daniel root       597 2010-04-04 21:20 ppp.sh*   
   >   
   > Owner of this file may need to be root, and this one change might   
   > do everything needed.  But that is just a possiblity.   
   >   
   > chown root:root /path/to/ppp.sh   
   > /* Must be done as root, of course. */   
   >   
   > should make owner and group both root.  Permissions can be set to   
   > make things work with owner of this file daniel, but that could   
   > be complex as most often it is the owner of the file/executable   
   > that is critical and dealing with chains of commands/files can   
   > get tricky.   
      
   That should not make a difference unless the file were an suid file. It   
   is not ( and I do not believe a script can be). The owner of the command   
   is user runs the command, not the owner of the file.   
      
   Anyway, try running it as root to see if it is a permission problem   
   somewhere. It is useless to hunt for permission changes if they actually   
   have nothing to do with the problem.   
      
      
   >   
   >   
   >   
   >> After selecting my 3G USB dongle in Network Center, I run my   
   >> ISP's script, ppp.sh, which looks like this....   
   >> ____________________________________   
   >> #! /bin/sh   
   >>   
   >> echo "copies my config and tries to start ppp"   
   >>   
   >> sudo cp -pf /etc/sysconfig/network-scripts/chat-ppp0.rhw   
   >> /etc/sysconfig/network-scripts/chat-ppp0   
   >   
   > Above command runs sudo.   
   >   
   >> echo "Trying to connect"   
   >   
   >> sudo pppd lock modem crtscts asyncmap 00000000 defaultroute   
   >> usepeerdns debug /dev/ttyUSB0 460800 ipparam ppp0 linkname ppp0   
   >> call ppp0 noauth || exit   
   >   
   > Above command runs sudo.   
   >   
   >> echo "Waiting for connection..."   
   >> while [ -z "`grep 10.11.12.13 /etc/resolv.conf`" ]; do sleep 1; done   
   >>   
   >> echo "Setting Nameserver"   
   >> sudo bash -c 'echo "nameserver 139.130.4.4" > /etc/resolv.conf'   
   >   
   > Above command runs sudo, in this case to allow writing to a file   
   > owned by root with permissions 644 (read/write for owner, read   
   > for group and others).   
   >   
   >> read -p "Press enter to terminate session." kill   
   >>   
   >> sudo killall pppd   
   >   
   > Above command runs sudo.   
   >   
   >> ______________________________________   
   >>   
   >> and the /etc/sysconfig/network-scripts/chat-ppp0.rhw that gets   
   >> copied is ...   
   >> ______________________________________   
   >> ABORT BUSY   
   >> ABORT ERROR   
   >> ABORT 'NO CARRIER'   
   >> ABORT 'NO DIALTONE'   
   >> ABORT 'Invalid Login'   
   >> ABORT 'Login incorrect'   
   >> ABORT VOICE   
   >> ABORT 'NO ANSWER'   
   >> ABORT DELAYED   
   >> ABORT 'SIM PIN'   
   >> '' ATZ   
   >> OK-AT-OK 'AT+CPIN?'   
   >> OK-AT-OK 'AT+CMEE=2'   
   >> OK-AT-OK 'AT+CGDCONT=3,"IP",""'   
   >> OK-AT-OK 'AT+CGATT?'   
   >> OK 'ATDT*99***3#'   
   >> TIMEOUT 120   
   >> CONNECT ''   
   >> TIMEOUT 5   
   >> '~--' ''   
   >> _______________________________________   
   >>   
   >> Both of these scripts were written by my ISP to get me connected   
   >> to the internet via my 3G USB dongle.   
   >>   
   >>    
   >>   
   >>>>> I used to run the script just as User, so don't know why the   
   >>>>> permission might have changed.   
   >   
   > I think your problem is with sudo, and I do not use that.  The   
   > following is my guesswork.   
   >   
   > man sudo   
   >   
   > Note the Description first paragraph.   
   >   
   > Then look at /etc/sudoers.  Note editing must be done (as it   
   > says) with visudo command.   
   >   
   > If you have this file available in backup, from a time when it   
   > worked as you wish, using that would be better than experimenting   
   > with modifications.   
   >   
   > Otherwise, my guess is you need to uncomment # Cmnd_Alias   
   > NETWORKING.* by removing the # at the start of the line, add to   
   > that line the full path name for ppd and for your ppd.sh script   
   > and maybe for killall as well.   
   >   
   > You will need to be in a group authorized for sudo.  I think   
   > putting daniel in wheel group (using userdrake) and editing   
   > /etc/sudoers to allow wheel to do what you want to do would work.   
   >   There may be an easier or less dangerous way to accomplish what   
   > you need.  If userdrake shows group sudoers available, that   
   > should be the choice, but then /etc/sudoers will have to have   
   > group sudoers included and able to do what you want.   
   >   
   > OR:   
   >   
   > You may need to change permissions on your ppp.sh script:   
   > chmod 4755 /path/to/ppp.sh   
   > of something similar.  In this case, the 4 will set user ID to   
   > that of the script (presumably root) while 6 instead of 4 (chmod   
   > 6755 ) would set both user and group to that of the file.  The 7   
   > grants file owner read, write, and execute privileges, while the   
   > first 5 grants group read and execute privileges and the second 5   
   > grants others (anyone) read and execute privileges.   
   >   
   > So, my guess is you need some or all of,   
   >   
   > Change ownership of ppp.sh to root.   
   > Change permissions on ppp.sh to run suid/sugid.   
   > Put yourself in a group authorized to use sudo,   
   > which may involve editing /etc/sudoers to allow a user or group   
   > to use sudo,   
   > making sure the user/group authorized to use sudo is ok for the   
   > commands you will run as sudo.   
   >   
   > Cheers!   
   >   
   > jim b.   
   >   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca