0

Hi I am not very experienced with user management in ubuntu. I needed to create a new user to manage my application server so following some instructions online, this is what i did:

I became root

sudo -i

I added a group

addgroup jbossgroup

I added a user and assigned it to a group

useradd -g jbossgroup jboss

I created a password

passwd jboss

Then I changed the ownership of a folder to check that the user was correctly created and that working fine.

chown jboss:jbossgroup /opt/jboss-as-7.1.1.Final/ -R

I made this user sudoer

gpasswd -a jboss sudo

But i think this is not working since when I use mkdir or rm... in a folder owned by root, i have to type sudo.(Did i do this step correctly?)

The next thing I noticed was that when i changed to the newly created user, the terminal only displayed this:

$

So I fixed that by doing this as the jboss user:

chsh -s /bin/bash

I have some doubts

  • Did I correctly create this user and is it safe to work with it?

  • Why the name of the user doesn't appear in the drop down menu when I click the shutdown button(Next to the time in the top right corner of the screen)?

  • Also I noticed that in the home folder there is not a jboss folder. Why this was not created?

  • What other features this user might be missing?

sfrj
  • 238
  • 5
  • 14
  • 1
    Rather than with `useradd` you should create a new user with `adduser`. See e.g. http://askubuntu.com/questions/139304/useradd-seems-to-have-failed-in-lubuntu-12-04, http://askubuntu.com/questions/54992/how-to-add-user-without-useradd-command – Takkat Jan 06 '13 at 15:00

1 Answers1

1

You could have achieved your goal in only three steps:

sudo adduser jboss

sudo passwd jboss you have to supply the password :)

sudo adduser jboss sudo adds jboss to the group sudo

And please be aware that gpasswd is the wrong tool to add a user to a group!

guntbert
  • 12,914
  • 37
  • 45
  • 86