Skip navigation.
The QNX Community Portal

View topic - QNX user creation

Page 1 of 1

QNX user creation

PostPosted: Thu Dec 08, 2016 6:37 am
by AshiGupta

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 ?


Re: QNX user creation

PostPosted: Thu Dec 08, 2016 2:19 pm
by Tim
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).


Re: QNX user creation

PostPosted: Fri Dec 09, 2016 5:47 am
by AshiGupta
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.