# pkexec ve pkttyagent

## pkexec

"pkexec" komutu ile bir programı başka bir kullanıcının hakkında çalıştırabiliriz.

synopsis;

> pkexec --user \<username> program&#x20;
>
> Örnek;
>
> pkexec --user musana cmatrix
>
> Yukarıdaki komut ile cmatrix programı musana kullanıcısı tarafından başlatılmış olacak.

### pkttyagent

pkttyagent ise metin tabanlı doğrulama mekanizmasıdır. pkttyagent programına "--process" komutu vasıtasıyla hangi process verilmiş ise o process için authentication istenildiği zaman pkexec bunu yakalar. Bu durum için iki terminalin açık olması gerekir.(veya ssh oturumu.)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://security.musana.net/linux/pkexec-ve-pkttyagent.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
