LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   wlassistant permission change (https://www.linuxquestions.org/questions/linux-newbie-8/wlassistant-permission-change-508870/)

~zoey~ 12-09-2006 01:49 PM

wlassistant permission change
 
I am running PCLOS Jr. on a Toshiba Tecra Laptop. I have to start my wireless connection with each boot. [not re-install, just restart]. I don't really mind this, but I would like to be able to access the wlassist without using the root password each time. I have used chgrp and chown to change groups and ownership to me and the command line tells me this was done, but the root password box still comes up each time that I access wlassist.

Could someone please tell me what else I need to do?

Thanks, zoey:study:

wmakowski 12-10-2006 11:02 AM

I can think of two options:

1)Place the necessary commands to start up your wireless connection in your /etc/rc.d/rc.local. This way when you boot it will automatically be started.

2)If you tried that and still have troubles, take a look at sudo. You can make an entry in the sudoers file to allow your regular user access to the wlassist command.

Bill

~zoey~ 12-10-2006 08:42 PM

Thanks Bill.

This is what I put in /etc/rc.d/rc/local;
iwconfig ath0 essid router
iwconfig ath0 ap xxxxxxxxx <-------mac address of router
iwconfig ath0 key xxxxxxxxxx <-----wep key
dhclient ath0
It didn't work, but I probably didn't use the correct commands. The message that I get when the boot spins for awhile trying to connect to ath0 is; 'determining IP info for ath0 failed'.

I got into the sudoers file and it sure looked like a foreign language to me. I hadn't a clue what I should be doing in there.

zoey

wmakowski 12-11-2006 08:26 PM

I'm sorry that I don't have experience with setting up a wireless connection using a script at login. I'm sure their are other people around that have done it before and it would probably be the ideal solution.

The documentation for sudoers makes it look worse than it is to give you access for running a command for which a normal user doesn't have access to. I recently set up my regular user so it can use mount and umount. Here is an example:

As root, enter the command visudo. This will take you into a vi editor used to modify the sudoers file. The nice thing about doing it this way is that the syntax of your entries will be checked when you save the file. The file should be pretty empty with several commented sections. Go to the bottom of the file where the User priviledge specification section starts.

In my example I entered the following:
Code:

barney    ALL=NOPASSWD,/bin/mount,/bin/umount
This will allow user barney to use the mount and umount commands from any host without entering a password. barney is the username, ALL means from any host, NOPASSWD doesn't ask for a password, and the commands you want to allow follow. They must include the full pathnames in order to work.

To use the mount or umount command barney would do the following.
Code:

sudo mount /mnt/cdrom
Obviously there are a lot more options and things you can do with sudo. This should get you started the quick way. If you run into any problems with using sudo, just ask.

Bill

~zoey~ 12-11-2006 09:56 PM

Vi
 
I managed to get into Vi as root and even got the All=NOPASSWD command entered, but then I couldn't figure out how to exit with the command entered into the file. I found some Vi info on the net, so I need to see if I can figure it out. I have never tried to use it before. Which mode should I be in to edit sudoers is it 'insert mode' or one of the others?

I am going to remove ath0 from boot at least until after Christmas and just use wl assistant. I need to do some things not computer related!

Thanks, zoey

wmakowski 12-12-2006 05:21 PM

Here is the quick and dirty on the vi editor. This editor was developed
when keyboards did not have arrow keys or a numeric keypad. It is a little
difficult to learn at first, but once learned I found that I can move faster
than a gui type editor because my hands never leave the keyboard.

There are two modes command mode and insert mode. While in command mode
you can move around the document using the h, j, k, and l keys.
h - go left
j - go down
k - go up
l - go right

To go into insert mode you type an i. You will then be able to enter
text beginning at the cursor location.

To get back into command mode hit the ESC key. If you want to delete a
character, go into command mode and position the cursor over the character,
then type an x. To replace a character, position the cursor, type r and
then the character you want to replace it with. To replace a bunch of
characters type R and start typing.

To save a document, be in command mode and enter :wq for write quit. If
you mess things up totally and just want to leave without making changes
enter :q!. Finally if you want to exit and haven't made any changes
use :q.

There are of course many other commands and ways to do things in vi. If
you are interested in learning the vi editor there is a book by O'Reilly &
and Associates called, you guessed it, "Learning the vi Editor".

Bill

~zoey~ 12-13-2006 09:31 AM

Thanks!
 
Thank you very much Bill, for all of your help. I appreciate it.

:) zoey:study:

chrism01 12-13-2006 05:43 PM

FYI, in a lot of modern distros, vi is aliased to vim (vi improved), so you can use the arrow keys etc.
http://www.vim.org/htmldoc/help.html


All times are GMT -5. The time now is 01:01 PM.