0

Is there a way to add a new user from the terminal AND have the system setup their user profile? ie, create their home DIR and add then to the sudoers file? I'd like to be able to do this without them having to log in via the GUI. This is an Ubuntu 14.04 system.

2

like this?

$ sudo adduser --ingroup sudo foo

this will create user foo and add them to the sudo group which should already be in the sudoers file.

if you need more fine-grained control about what goes into the sudoers file and are not afraid of interactivity (and vi!), just do:

$ sudo adduser foo
$ sudo visudo
  • thanks - I ran useradd, instead of adduser, which makes you have to setup everything manually. problem solved thanks:) – user53029 Sep 11 '14 at 8:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.