c - How to add user in Linux with his information -
I want to create a C application for linking the user with the useradd
command in Linux.
I write this code while using the terminal print error message:
This is my C code for adding as user as I would like to add user1
to write user1
char a [50]; Four commands [150]; Fgets (a, sizeof (a), stdin); Strcpy (command, "useradd"); Strcat (order, a);
How can I solve this problem with the right syntax or command?
If the sudo
package is not installed, you can install it . Or you can create it as a root using su
. This will ask for the root password after which you can use any superuser camayad.
Comments
Post a Comment