Create User With Command Line Linux Mint 10

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
misfitplanet

Create User With Command Line Linux Mint 10

Post by misfitplanet »

I'm using useradd to create a new user in using Linux Mint 10 Julia Live via command line.

Code: Select all

useradd tommi -g mint -d /myhomedirectory -p "password"
What Linux command does Mint encrypt the passwords here so useradd gets it the way it should? For example, I think it should look something like this:

Code: Select all

useradd tommi -g mint -d /myhomedirectory -p encrypt('password')
How do I add permissions to this user? The code above does create a user, but when I check the users privileges in Users and Groups, the user has no privileges checked.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
unexistance

Re: Create User With Command Line Linux Mint 10

Post by unexistance »

Hi,

Code: Select all

man useradd
As for the password, normally we set password in linux/unix by something like:

Code: Select all

$ passwd <username>
Enter Password: <blanks>
Enter Password Again: <blanks>
So no plain-text password. It auto-encrypt to /etc/shadow anyway, so you would not see the password anywhere

Regards,
misfitplanet

Re: Create User With Command Line Linux Mint 10

Post by misfitplanet »

Ok, but I want to automate the process in a script, so I would be able to do this, unless there is a way to force input at this prompts by some method.
Locked

Return to “Beginner Questions”