This question already has an answer here:
I'm trying to make a script where it makes a test user with a home dir and the rights he needs but everytime I run the script I get the following error:
/home/thomas/Scripts/CreateUser.sh: line 2: useradd: command not found passwd: user 'password' does not exist /home/thomas/Scripts/CreateUser.sh: line 4: mkhomedir_helper: command not found chmod: cannot access ‘/home/Test/’: No such file or directory
#!/bin/bash useradd Test passwd password mkhomedir_helper Test chmod 700 /home/Test/
I'm new to linux so I don't know why this happens, any solutions?