I want to add more terminals to the file /etc/securetty
. More specifically I would like to add pts/n
, where n
is in the range 0-9
, if it does not exist. Is this possible through sed
command? The following is how the contents of my /etc/securetty
are:
# Local X displays (allows empty passwords with pam_unix's nullok_secure)
pts/0
pts/1
pts/2
pts/3
I tried some thing like:
sudo sed '+pts/3+a pts/4' /etc/securetty
which gives the following error:
sed: -e expression #1, char 3: extra characters after command
pts/n
, or all of them? – choroba Apr 12 '17 at 11:07/
works fors
command, but not for addressing, so it would be '/pts/3/a pts/4' – Philippos Apr 12 '17 at 12:50'\+pts/3+a pts/4'
– tripleee Apr 16 '17 at 06:39