top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Creating an Admin user After Installation on UBuntu - from the CLI

+1 vote
445 views

I would like to manually add a new user to my Ubuntu 12.04 box with admin privileges.

This is what I did so far:

adduser 
adduser  admin, sudo

Edited the sudoers file with visudoers:

# User alias specification
...
User_Alias ADMINS = 
 ...
# User privilege specification

...
 ALL=(ALL) ALL 
...

I then logged in with the new user, but every time I try to run a command (like visudoers) it says the command is not found. when I "echo $PATH" the /bin/sbin directory is not in the path.

Is there a similar command to adduser but for admin users (so it copies the root user skeleton at the end (copy /etc/skel)? How do I manually create a user like the one I create as the first user when installing Ubuntu?

posted Oct 14, 2013 by Dewang Chaudhary

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

You need to add that to the users path in either .profile or .bashrc. Or, make them call sudo by the full path, which is much safer.

answer Oct 14, 2013 by Amit Parthsarthi
In case I wasnt clear: After doing the changes, this is what I get:

$ sudo visudoers
sudo: visudo: command not found

When entering the command, I was able to use autocomplete (by pressing the TAB key), so I guess it knows the command exists...What do you mean by "make the call sudo by the full path"?
Similar Questions
0 votes

I have switched my laptop to Ubuntu 12.04 (14.04 was not out then) from Windows XP. Everything works great except for two things:

Google Earth does not recognize his on-board VGA adapter (Intel 945) as capable to manage 3D textures. and I cannot get his old Lexmark x2620 printer to work. Can anyone suggest some pointer.

+2 votes

I have installed the Heroku on my workspace, however when I type any command, for example- heroku login or heroku version , it just shows the command- "heroku-cli: Installing core plugins..." and keep doing the same until I stop the installation manually.

Can somebody help me with what the actual issue is and how I can deploy the app on heroku!

0 votes

I'd like to install a master on a virtual machine and rsync this installation to ten clients (desktop installation for a library). Also, all changes after the initial installation to this master image should be replicated to them.

There are some modifications for the master installation necessary. It must not use UUIDs for example.

Is there a ready-to-use script for this scenario?

Thank you in advance.

0 votes

I have an Ubuntu VDI image (created through Virtual box) in one laptop and want to install Ubuntu on bare metal using this VDI image.
Is it possible ?

0 votes

I am using Ubuntu 14.04 and facing problem with ubuntu? On my machine Skype starts, asks to log in and then presents its list of connections. However after a couple of moments the list of connections gets
"inactive" (greys out) and finally disappears.

In the crash window that then pops up I see that something with libc.so.6 seems to be amiss.

Any idea what I can do to fix the problem and where do I find the info that is in the "crash report window" so I
could add it to this email if needed?

...