(name: &str)
| 65 | } |
| 66 | |
| 67 | pub fn create_system_user(name: &str) -> Result<(), Error> { |
| 68 | let mut command = Command::new("useradd"); |
| 69 | command.args([ |
| 70 | "--system", |
| 71 | "--no-create-home", |
| 72 | "--shell", |
| 73 | "/usr/sbin/nologin", |
| 74 | name, |
| 75 | ]); |
| 76 | command_status(&mut command, "useradd") |
| 77 | } |
| 78 | |
| 79 | pub fn delete_system_user(name: &str) -> Result<(), Error> { |
| 80 | let mut command = Command::new("userdel"); |
no test coverage detected