LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (https://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   How can i create another user than root? (https://www.linuxquestions.org/questions/slackware-installation-40/how-can-i-create-another-user-than-root-137046/)

BroinK 01-21-2004 07:13 AM

How can i create another user than root?
 
I read somwhere in a file (cant remember wich) that i shouldnt be logged in as root all the time. But how do i create another user account?

:newbie: question no.2

have a good time //JEsper

Bebo 01-21-2004 07:26 AM

You use the command useradd. For instance, if you want to create a user that with username broink, home dir /home/broink and shell bash, issue
Code:

useradd -d /home/broink -g broink -G users -m -s /bin/bash broink
Well, see the man pages (man useradd) for more info on the command.

About the groups ("-g broink -G users")... The groups have to be created first, using groupadd. The group given after "-g" in the useradd command is the default group, and I usually put the user's own group there (broink, here). After "-G" a whole list of groups can be given, if you want to. There might be files/commands that you want the users as a group to access, so then it might be a good idea to let the users belong to the group users as well, to make things a bit easier.

IMPORTANT! When you create a user account like this, it won't have a password yet! Issue passwd broink to set one!

GT_Onizuka 01-21-2004 08:25 PM

Or you could type useradd and it will guide you through adding a user (ie, it will ask what do you want for the login name, what group(s) etc). Harder to mess that up too.

BroinK 01-22-2004 01:20 PM

i just wrote adduser and a small "guide" helped me through the usermaking


Thanks for all help


All times are GMT -5. The time now is 12:27 PM.