IRCNow

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

openbsd:doas [2019/11/09 22:57]
jrmu created
openbsd:doas [2020/05/11 07:29] (current)
net_wayfarer Added permit persist, and a link to mastering doas.
Line 1: Line 1:
-OpenBSD does not come with sudo by default, and normally you don't want to log in as root. When you need to perform sysadmin tasks, you change to super user by running:+OpenBSD does not come with ''​sudo'' ​by default, and normally you don't want to log in as root. When you need to perform sysadmin tasks, you change to super user by running:
  
 <​code>​ <​code>​
Line 5: Line 5:
 </​code>​ </​code>​
  
-OpenBSD provides doas, a lightweight and secure replacement for sudo. This allows you to run a command as root by doing:+OpenBSD provides ​''​doas''​, a lightweight and secure replacement for ''​sudo''​. This allows you to run a command as root by doing:
  
 <​code>​ <​code>​
Line 11: Line 11:
 </​code>​ </​code>​
  
-You will want to add your user to /​etc/​doas.conf:​+You will want to add your user to ''​/​etc/​doas.conf''​:
  
 <​code>​ <​code>​
Line 17: Line 17:
 </​code>​ </​code>​
  
-(Note the # sign means you must run this as root, by logging in first using su; a $ sign means you run the command as your normal user)+(Note the # sign means you must run this as root, by logging in first using ''​su''​; a $ sign means you run the command as your normal user)
  
-Here's /​etc/​doas.conf should contain (replace user123 with your own username):+Here'​s ​''​/​etc/​doas.conf'' ​should contain (replace user123 with your own username):
  
 <​code>​ <​code>​
Line 25: Line 25:
 </​code>​ </​code>​
  
-This permits user123 to login as root using doas without a password.+This permits user123 to login as root using ''​doas'' ​without a password.
  
 After doing this, you can confirm it works: After doing this, you can confirm it works:
Line 33: Line 33:
 user123 user123
 </​code>​ </​code>​
 +
 +If you find the need to constantly enter your user password for when you need to do anything as root annoying, you can have in your ''/​etc/​doas.conf''​
 +<​code>​
 +permit persist user123 ​
 +</​code>​
 +
 +See also, https://​flak.tedunangst.com/​post/​doas-mastery