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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
02-17-2011, 12:23 PM
|
#1
|
|
LQ Newbie
Registered: Jan 2011
Posts: 6
Rep:
|
Execute EXEC or SHELL as a root
Hello, can i execute this line:
sudo ln -b /dev/ttyUSB0 /dev/ttyS0
From gambas in a virtual terminal/consol, without it ask me the root's password???
I tried like this:
EXEC ["sudo", "ln", "-b", "/dev/ttyUSB0 /dev/ttyS0"] WAIT
and this
SHELL "sudo ln -b /dev/ttyUSB0 /dev/ttyS0" WAIT
and it doesn't work.... plase someine Help ME!!! =)
|
|
|
|
02-17-2011, 12:27 PM
|
#2
|
|
Senior Member
Registered: May 2010
Distribution: Arch, Gentoo, Slackware
Posts: 1,479
|
sudo does not ask for the root password.
|
|
|
|
02-17-2011, 12:49 PM
|
#3
|
|
Senior Member
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 11.4
Posts: 1,314
|
What did you define in /etc/sudoers?
|
|
|
|
02-18-2011, 12:22 PM
|
#4
|
|
LQ Newbie
Registered: Jan 2011
Posts: 6
Original Poster
Rep:
|
1. YES! it asks password.
2. I tried everything =(
in /etc/sudoers i tried to give permision like this:
user_name ALL=(ALL) ALL
and also:
unser_name ALL = NOPASSWD:/dev/ttyUSB0 /dev/ttyS0
and it doesn't work..... Please HElp Me !!! =)
|
|
|
|
02-18-2011, 12:31 PM
|
#5
|
|
Senior Member
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 11.4
Posts: 1,314
|
Quote:
Originally Posted by mafesabu
user_name ALL=(ALL) ALL
|
Good. Do you see any "Defaults targetpw" in the file?
Quote:
Originally Posted by mafesabu
unser_name ALL = NOPASSWD:/dev/ttyUSB0 /dev/ttyS0
|
This makes no sense, as you have to specify the granted command, i.e. /bin/ln, therein instead. But the first rule you mentioned should do already.
|
|
|
|
02-18-2011, 12:35 PM
|
#6
|
|
Member
Registered: Jul 2010
Location: São Paulo - Brasil
Distribution: Fedora 17 amd64 / Fedora 17 i686 LXDE (w e17)
Posts: 229
Rep:
|
Quote:
Originally Posted by mafesabu
1. YES! it asks password.
|
but not root's, it asks for the user password :P
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:03 PM.
|
|
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
|
|