Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
01-06-2010, 06:43 AM
|
#16
|
LQ Guru
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
|
Hi,
That indeed is the sudoers file, but don't just edit it like that. You have to use:
as a user in order to edit it. To check out if you are of the admin group (which I think you are if you're the only user, and since you can use sudo), type in a terminal as your user:
and it'll show you all the groups and ids assigned to your user.
Kind regards,
Eric
|
|
|
01-06-2010, 06:46 AM
|
#17
|
LQ Guru
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
|
Also, what would be very useful to you is to look at the sudoers man page:
It's pretty extensive reading but I think worth the while. You can set a lot in the sudoers list.
Kind regards,
Eric
|
|
|
01-06-2010, 06:47 AM
|
#18
|
Senior Member
Registered: Mar 2009
Location: USA
Distribution: Arch
Posts: 1,022
Original Poster
Rep:
|
Quote:
Originally Posted by EricTRA
Hi,
That indeed is the sudoers file, but don't just edit it like that. You have to use:
as a user in order to edit it. To check out if you are of the admin group (which I think you are if you're the only user, and since you can use sudo), type in a terminal as your user:
and it'll show you all the groups and ids assigned to your user.
Kind regards,
Eric
|
Hello once again Eric.
"id" returns:
Code:
andrew@mylinuxbox:~$ id
uid=1000(andrew) gid=1000(andrew) groups=4(adm),20(dialout),24(cdrom),46(plugdev),104(lpadmin),115(admin),120(sambashare),1000(andrew)
|
|
|
01-06-2010, 06:48 AM
|
#19
|
LQ Guru
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
|
Quote:
Originally Posted by leopard
Hi. I re-did the file to those specifications, and it resulted in the said flashing of the terminal with no output or action. (It flashes very fast so I can't really see if anything happened but the command "airodump-ng" should result in sustained output)
|
Did you still leave a in your script? I think it's best to leave it out of the script and just use it like this:
Code:
sudo yourscriptname
Kind regards,
Eric
|
|
1 members found this post helpful.
|
01-06-2010, 07:03 AM
|
#20
|
Senior Member
Registered: Mar 2009
Location: USA
Distribution: Arch
Posts: 1,022
Original Poster
Rep:
|
Thanks Eric!
That did the trick. I made a GNOME menu entry and used "gksudo /home/andrew/Desktop/airodump-ng_auto" (airodump-ng_auto was my script name) and it worked like a charm.
I attached a few screenshots of the script in action!
Last edited by lupusarcanus; 03-07-2010 at 03:20 AM.
|
|
|
01-06-2010, 07:05 AM
|
#21
|
LQ Guru
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
|
Hello Andrew,
Glad you got it running as you wanted. If you consider your thread as solved please mark it as such using the Thread Tools.
Kind regards,
Eric
|
|
|
01-06-2010, 07:13 AM
|
#22
|
Senior Member
Registered: Mar 2009
Location: USA
Distribution: Arch
Posts: 1,022
Original Poster
Rep:
|
Quote:
Originally Posted by EricTRA
Hello Andrew,
Glad you got it running as you wanted. If you consider your thread as solved please mark it as such using the Thread Tools.
Kind regards,
Eric
|
Sure did! It's in my sig! +3 Thank Icon clicks!
Here is the script that I used for future reference of this thread.
Code:
#! /bin/bash
service network-manager stop
ifconfig wlan0 down
iwconfig wlan0 mode monitor
ifconfig wlan0 up
airodump-ng wlan0
|
|
|
01-06-2010, 09:12 AM
|
#23
|
Member
Registered: Dec 2009
Location: NE Ohio
Distribution: Open SUSE
Posts: 43
Rep:
|
&& vs ||
Also note that you join commands with && if you want to stop the sequence if any of the commands fail. "echo 1 && echo 2" means echo 1 and if that statement succeeds, then run the command "echo 2" and on and on any number of commands. On the other hand "echo 1 || echo 2" means run "echo 1" and then only if that fails, run "echo 2"
And if you really don't care what the return status is or the return status is undefined (unlikely on Linux but very prevalent in Windows) then just use the semicolon (";").
Last edited by vrmartin2; 01-06-2010 at 09:13 AM.
Reason: spelling correction
|
|
|
01-06-2010, 09:55 AM
|
#24
|
LQ Newbie
Registered: Jan 2010
Posts: 5
Rep:
|
it looks great to me i am curious to know further.
|
|
|
All times are GMT -5. The time now is 03:19 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|