0

I'm a new user to Linux and been practicing using creating/using scripts in bash.

I found a script to add new users automatically but when I try to run the script in root, I keep getting the same error message :'No such file or directory'. the message snippet is as follows:

student@Ubuntu1410:/$ chmod +x /home/student/Scripts/adduser.sh
student@Ubuntu1410:/$ ./adduser.sh
bash: ./adduser.sh: No such file or directory
student@Ubuntu1410:/$
  • Can we see the contents of the script? Where have you saved the script? have you used cd to go to that directory? – Tim Jun 28 '15 at 11:01

1 Answers1

0

If your script is in /home/student/Scripts/ then start it from there.

cd /home/student/Scripts
./adduser.sh

Or with path

sh /home/student/Scripts/adduser.sh

I do not know what the script is. It probably will need sudo.

Pilot6
  • 90,100
  • 91
  • 213
  • 324