Why does `sudo` uses `/dev/pts/` terminal and `su` uses `pts/` terminal?
Issue
- When user runs
sudo
command, it gets/dev/pts/*
terminal
Apr 28 01:34:25 server sudo: root : TTY=pts/2 ; PWD=/root ; USER=root ; COMMAND=/bin/ls
- When user run
su
command, it getspts/*
terminal
type=USER_END msg=audit(1367092548.507:8228): user pid=8146 uid=0 auid=0 msg='PAM: session close acct="gs" : exe="/bin/su" (hostname=?, addr=?, terminal=pts/2 res=success)'
- Is this behaviour expected? Is there any vulnerability in
su
orsudo
?
Environment
- Red Hat Enterprise Linux 4
- Red Hat Enterprise Linux 5
- Red Hat Enterprise Linux 6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.