How Amazon AWS does sudo not need a password

2017-05-29

I have used many service providers, including AWS. In many service providers, the host needs a password, but AWS does not. AWS is a certificate login. However, after other service providers log on, sudo needs a password, while aws does not, which surprised me. After a series of explorations, I found the difference between AWS and other service providers.

This article was migrated from My Own. The original link is https://wudew.com/posts/63

stay /etc/sudoers There is such a line

 # includedir /etc/sudoers. d

This line refers to /etc/sudoers. d Below (basically) all documents (refer to /etc/sudoers.d/README

Then amazon installer creates /etc/sudoers.d/90-cloud-init-users Such a file has the following contents

 # Created by cloud-init v. 0.7.5 on Sat, 14 May 2016 12:31:57 +0000

 # User rules for ubuntu ubuntu ALL =(ALL) NOPASSWD:ALL

It seems that the result is obvious, /etc/sudoers It refers to the files of users who do not need passwords in sudo. Because of security, ubuntu does not recommend modifying them directly /etc/sudoers Files, but contains /etc/sudoers. d Directory. By creating a permission file in this directory, the password sudo is not required In addition, this is the file information of 90 cloud init users: -r--r----- 1 root root 123 May 14 2016 90-cloud-init-users

Maintenance of the website requires a certain amount of expense. If you agree with this article, please close the advertisement blocker and browse the advertisement. Thank you!
Loading

(∀) In other words, welcome to the small station of lookas!

This is the place where lookas records some things. From time to time, there may be some magical brain holes or unreliable ideas of lookas.

Anyway, let's have a look.