Skip navigation.
Home
The QNX Community Portal

View topic - QNX user creation

QNX user creation

For discussion of realtime and/or embedded programming.

QNX user creation

Postby AshiGupta » Thu Dec 08, 2016 6:37 am

Hi,

I want to create new users with password in my code. Using passwd utility prompts for user input to enter password which i want to avoid.
I tried shell scripting or using a text file as an input for passwd command but this didnt worked. This still prompts for Enter Password and wait for user input.
Is there is any way to do this or is there is any single line command to create a new user and doesnt require user input ?

Ashi
AshiGupta
Active Member
 
Posts: 19
Joined: Wed Aug 24, 2016 11:09 am

Re: QNX user creation

Postby Tim » Thu Dec 08, 2016 2:19 pm

There is no need to ask this in 3 different sub-forums as this board isn't busy enough that anyone would miss your posts.

I suspect the answer is no with regards to the 'passwd' program.

On the other hand there is nothing preventing you from manually adding users yourself by modifying the passwd/opasswd/shadow/oshadow files. The only catch to that is that all new users will have to have the same default password (since the actual encrypted password algorithm isn't known or readily available).

Tim
Tim
Senior Member
 
Posts: 1388
Joined: Wed Mar 10, 2004 12:28 am

Re: QNX user creation

Postby AshiGupta » Fri Dec 09, 2016 5:47 am

There were multiple sub-forums for QNX developers and i was not sure which sub-forum will be good to ask.

I was looking for command line option for creating user...manually modification for passwd/opasswd/shadow/oshadow worked for me and for password encryption i am using qnx_crypt() function.

Thanks Tim.

Ashi
AshiGupta
Active Member
 
Posts: 19
Joined: Wed Aug 24, 2016 11:09 am


Return to Realtime and Embedded

Who is online

Users browsing this forum: Bing [Bot] and 3 guests