Add a new user steps for Oracle Linux 5
You can add users to your Oracle Linux system using the useradd
command as root. If you need to add a group as well, use the groupadd
command. You can see extended help for both commands by typing man useradd
and man groupadd
at your terminal prompt.
Here's an Article from Oracle explaining exactly how to manage users on Oracle Linux.
An example:
useradd jimmy
After adding the user, assuming it's for an actual person and not a system service, you likely want to set a password:
passwd jimmy
The user details are visible in the "/etc/passwd" file. If no UID is specified, the next largest UID is assigned. A new group with a group name matching the user name is also created. By default, the users home directory is created under the "/home" directory and the shell is "/bin/bash".
Related videos on Youtube
Metalskin
Updated on September 18, 2022Comments
-
Metalskin over 1 year
It's been over 10 years since I last used RedHat (which I believe that Oracle Linux came from). So I cannot remember the steps to create a new user, add them to the appropriate groups, set up their home environment, etc.
I can find individual commands for Oracle Linux, but no work flow on how to go about the process (as in what steps an admin must follow to do the complete process of adding a new user to the Oracle Linux environment).
Could someone provide the recommended steps when a new user is required for a Oracle Linux system please?
Edit
I should note that I'm dealing with a headless system so I need to know how to do this from the command line. Looking at the resources on the oracle site keeps showing GUI ways to do things intermingled with the CLI. For example, it states the command of how to create a user at the command line, but doesn't show how to set the user name via the command line. Instead it shows the GUI User Manager tool.
-
jordanm over 10 yearsYou can use the GUI tools on a headless server if you choose to. Just use X11 forwarding with
ssh -X
. -
schaiba over 9 years
useradd
is your friend on any distribution. I can't give you the full command since I don't know what exactly you want, but the command's manual page will clear it up for you.
-