How to write a process to log root by c

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to write a process to log root by c

1,588件の閲覧回数
tingning
Contributor II

i want write a process to log root but i don't know how design the process

i hope i can get your help

if you  offer your source code i will Grateful

thanks

2 返答(返信)

1,493件の閲覧回数
b36401
NXP Employee
NXP Employee

You can set setUID bit for your binary:

# chown root your_binary

# chmod 4755 your_binary

Then it will be executed with root privelegies.

Have a great day,

Victor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

1,493件の閲覧回数
tingning
Contributor II

Hello Victor Linnik!

thank you for reply me  but  I suffer trouble which is like this

for example

ning@ubuntu:/work$ su

Password:

this Password  is required input by system ,

i  don't want to use keyboard, i went use executable file which is Compiled by gcc

please help me

i totally have not way  and come true it!

0 件の賞賛
返信