LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 05-09-2008, 11:10 AM   #1
at91sam9263
LQ Newbie
 
Registered: May 2008
Posts: 2

Rep: Reputation: 0
running user apps in kerenl mode



Hi,

My aim is to edit an ethernet device driver file so as to call a bin file in /usr/sbin. I am working in an ATMEL board. How can I call a user app when in kernel mode? Is there anything as sweet and short as a sytem() call (no high hopes)? If not so, any work-arounds that you can suggest?

Thanks
Maas
 
Old 05-09-2008, 12:16 PM   #2
KenJackson
Member
 
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora and others
Posts: 757

Rep: Reputation: 145Reputation: 145
I think you are asking how you can edit a file which is owned by user 'root' or some other user that you don't have privilege to edit. Right?

If that's what you need to do, and you know the superuser (root) password, you can use the su command to temporarily become root. You'll be prompted for the password for root. Be careful. You'll have awesome power until you execute exit to return to mere mortal status.

Alternately, if the /etc/sudoers file is configured correctly (as it always is on Ubuntu), you can use the sudo command on each command. You'll be prompted for your own password, (not root's). Naturally, you can use whatever editor is installed: emacs, vi, vim, nano, joe, nedit, etc. e.g.:

sudo nano filename
 
Old 05-09-2008, 07:56 PM   #3
fbianconi
Member
 
Registered: Apr 2008
Location: argentina
Distribution: Arch
Posts: 86

Rep: Reputation: 22
I think this is near what you're looking for: a framework for user-space device on Linux
http://svn.xiph.org/trunk/fusd/README
 
Old 05-10-2008, 01:21 AM   #4
at91sam9263
LQ Newbie
 
Registered: May 2008
Posts: 2

Original Poster
Rep: Reputation: 0
no root privilege needed

Hi,

I think I've been misunderstood. I am compiling the ethernet device-driver statically while building the kernel itself. The device-driver activates a function when the ethernet link is up. At this point I want to call a dhcp function for dynamically assigning an IP to my board. This dhcpc bin file is in /bin/udhcpc file in my initial ram disk. Whatever calls to the user space I need to do, should be precompiled while building the kernel. So, my question is, how can I call this bin fiel in kernel mode? And I am not into building modules.

Thanks
Maas
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kernel panic while running user mode linux nlatha Linux - Software 3 03-24-2006 11:51 PM
Running GUI apps frm terminal while logged in as normal user muttley Debian 3 08-07-2004 11:39 PM
root apps running on X under regular user?? nny0000 Slackware 3 02-05-2004 02:09 PM
Running root apps in X using regular user? nny0000 Slackware 10 01-15-2004 12:23 PM
Running apps under another user Vlackmar Linux - General 1 03-06-2002 02:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration