1

I am trying to make a script to log in with my username directly without entering the password. The password should be entered automatically in the background, like the normal user you create in Ubuntu when you first install the OS when you sudo nano

vlad@Vlad:~$ sudo nano
[sudo] password for vlad:

I want the password to be entered automatically so I should have direct access to the editor where we make aliases.

I don't want to remove the password by any means. I want to write it in the script so it should connect automatically.

Zanna
  • 70,465
  • What exactly is the difference for you between disabling the password (easy) and having it automatically entered wherever it is needed (extremely difficult, I think)? I don't really understand your goals. – Byte Commander Feb 01 '17 at 18:58
  • I am having many other passwords to manually enter everytime i login on all of the servers i use via ssh/telnet, of course it is a small difference there but i think i can adapt it, i have aliases for them but this specific implement i want could easy my work, some passwords i copy/paste them everytime i need to connect and i need to search them first and this takes time sometimes. – inscripted Feb 01 '17 at 19:19
  • For SSH at least, the "right" way to do this is via key-based authentication, with a local agent IMHO – steeldriver Feb 01 '17 at 19:41
  • Sounds like this person wants to set up a sudo group with a list of specific scripts that can be run, or potential just a bunch of su - usernames's. – earthmeLon Feb 01 '17 at 20:00

0 Answers0