Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Creating new user using program and giving root access : (2 Items)
   
Creating new user using program and giving root access  
Hello, 

I just started working on QNX and want to write a program to create new user and give it root privileges. I can create 
new user using passwd command but i want to write code for that. Can any one tell me APIs i have to use to create user, 
assign password and root privileges to it.

AshiGupta
Re: Creating new user using program and giving root access  
A user account associates a textual user name with a numeric user ID and group ID, a login password, a user's full name,
 a home directory, and a login shell. This data is stored in the /etc/passwd and /etc/shadow files, where it's accessed 
by login utilities as well as by other applications that need user-account information.

If you are creating authentication using jwt like https://appdividend.com/2020/07/09/angular-authentication-system-login
-and-registration-in-angular/ this then you must need to generate a token from serverside and save it to the client-side
 for the future reference.

You should be able to create a User based on the API exposed by qnx system.