LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-21-2015, 04:07 AM   #1
paulgadsdon
LQ Newbie
 
Registered: Mar 2015
Posts: 10

Rep: Reputation: Disabled
Cant create user!


Hi

I am logged in as root and i am have issues creating a new user

su - /usr/sbin/useradd paulg

Comes back with the error:

su: user /usr/sbin/useradd does not exist


Any ideas please as I need to create myself a user with root privileges

Cheers
 
Old 05-21-2015, 04:10 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,792

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
see man su
su [options] [username]
it assumes /usr/sbin/useradd is the name of a user, which is obviously not true.
You need to use sudo instead of su (see man page about its usage too)

Do not create another user with root privileges at all, just use sudo instead.
 
1 members found this post helpful.
Old 05-21-2015, 04:14 AM   #3
paulgadsdon
LQ Newbie
 
Registered: Mar 2015
Posts: 10

Original Poster
Rep: Reputation: Disabled
Thanks for the reply

I need to as the user with root has logged me in and cant keep entering the password so I cant really use "Sudo" each time

I need a new user with root for the day

cheers
 
Old 05-21-2015, 04:22 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,792

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
you can use sudo each time (why not?), you can even configure it to allow login without password. creating a new user with root rights is still a bad idea.

Last edited by pan64; 05-21-2015 at 05:49 AM.
 
1 members found this post helpful.
Old 05-21-2015, 04:27 AM   #5
paulgadsdon
LQ Newbie
 
Registered: Mar 2015
Posts: 10

Original Poster
Rep: Reputation: Disabled
Oh because I dont have the password and I keep having to ask someone for it. They are not allowed to divulge it

And this person knows nothing about linux, so cant add the user himself

Cheers

Last edited by paulgadsdon; 05-21-2015 at 04:33 AM.
 
Old 05-21-2015, 04:52 AM   #6
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
So do 'su -', get him to enter the password once, profit!
 
1 members found this post helpful.
Old 05-21-2015, 04:54 AM   #7
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Run:

Code:
su -c '/usr/sbin/useradd paulg' root
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how create create extreme limited user ss4sgoku Linux - Newbie 5 10-28-2012 01:17 AM
create user without creating user home directory aksharb Linux - Software 1 05-12-2011 04:21 PM
Processes running while we create a new user and the user logs in rahulchandrak Linux From Scratch 3 05-07-2010 11:09 PM
Create user add file with default password and force user to change it? Morgandy Linux - Newbie 3 02-02-2010 05:06 PM
user home dir doesn't create when new user add dev_mohamed Linux - Software 3 01-12-2007 01:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration