LinuxQuestions.org
Visit Jeremy's Blog.
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 01-19-2006, 06:00 PM   #1
tweety22
LQ Newbie
 
Registered: Jan 2006
Posts: 1

Rep: Reputation: 0
Lightbulb setting user accts and passwords


HEy anyone. I am very new to linux and I have a question. I created a new user acct and I don't know how to set a password or to find out what the password is. Here is the command that I entered useradd -c "Mrblackball, practice account" -p practice -n blackballtest. It says to type in this command to ciew contents of password file more \etc\passwd, but I don't know what the password is still. I also need to log off the administrator acct and log in with the new user acct i created and i cant because of the password. Is there a command that I need to inter in the terminal to switch to the new user acct that I added. I hope this makes sense. Help please
 
Old 01-19-2006, 06:21 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
as root, type passwd username and this will let you reset the password to whatever you want.
 
Old 01-19-2006, 06:22 PM   #3
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,568

Rep: Reputation: 164Reputation: 164
Moved: This thread is more suitable in Linux-Newbie and has been moved accordingly to help your thread/question get the exposure it deserves.

There are two similar commands: useradd and adduser. Useradd just adds an user when adduser makes some more extra work, like creating and filling home directory, setting group and asking for password. Just for future reference...

When you have an account added using useradd you can change the password with 'passwd username' when you're root.
 
Old 05-30-2006, 11:04 AM   #4
vinodkumarmj
LQ Newbie
 
Registered: May 2006
Posts: 4

Rep: Reputation: 0
please tell me the differences between the useradd and adduser commands
 
Old 05-30-2006, 11:06 AM   #5
ethics
Senior Member
 
Registered: Apr 2005
Location: London
Distribution: Arch - Latest
Posts: 1,522

Rep: Reputation: 45
"There are two similar commands: useradd and adduser. Useradd just adds an user when adduser makes some more extra work, like creating and filling home directory, setting group and asking for password. Just for future reference..."

That seemed pretty crystal clear to me...
 
Old 05-30-2006, 09:15 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
or read the man pages
 
Old 05-31-2006, 12:38 AM   #7
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Quote:
Originally Posted by chrism01
or read the man pages
One of the two does not have a man page (at least on my slack boxes) That's the complete one that sets up everything.
 
Old 05-31-2006, 01:22 AM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
I sit corrected ... on my FC3 box, useradd appears to be the comprehensive one, and adduser (man page) appears to be symlinked to the useradd one ie I get the same page either way ...
 
Old 06-02-2006, 09:48 AM   #9
TSynergy
Member
 
Registered: Aug 2003
Location: Georgia U.S.A.
Posts: 101

Rep: Reputation: 16
neither useradd nor adduser works

Hi

Is there a reason why neither commands, useradd nor adduser works. I type at the command prompt 'adduser student', and I also tried 'useradd student.' Each time I get the error, 'command not found.'


bash: alias: -vi: not found
[tj@localhost ~]$ useradd student
bash: useradd: command not found
[tj@localhost ~]$


Tj

OS: Fedora Core 4
 
Old 06-02-2006, 09:55 AM   #10
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Become root and try again.
 
Old 06-02-2006, 10:07 AM   #11
ethics
Senior Member
 
Registered: Apr 2005
Location: London
Distribution: Arch - Latest
Posts: 1,522

Rep: Reputation: 45
type
Code:
su -
Then login as root as Nylex suggested (some distros dont have root, they use sudo, ubuntu is an examble of one)
 
Old 06-02-2006, 12:16 PM   #12
TSynergy
Member
 
Registered: Aug 2003
Location: Georgia U.S.A.
Posts: 101

Rep: Reputation: 16
Hi

Here is my result when I used su to use the system as root. Nothing different. Any other suggestions? Thanks. Tj

[tj@localhost ~]$ su
Password:
[root@localhost tj]# useradd student
bash: useradd: command not found
[root@localhost tj]# adduser student
bash: adduser: command not found
[root@localhost tj]# sudo
usage: sudo -K | -L | -V | -h | -k | -l | -v
usage: sudo [-HPSb] [-r role] [-t type] [-p prompt] [-u username|#uid]
{ -e file [...] | -i | -s | <command> }
[root@localhost tj]#
 
Old 06-02-2006, 02:16 PM   #13
pokemaster
Member
 
Registered: Apr 2005
Location: Massachusetts, USA
Distribution: debian,ubuntu,slackware
Posts: 110

Rep: Reputation: 17
Ummm.. odd problem, as I'm sure many will agree. useradd / adduser are integral to linux... it's pretty useless without users...

your installer had to have created users somehow, and the only thing I can think of is that your su command is configured to login with root provileges, but a normal user's path. Try /sbin/*prg* /usr/sbin/*prg* and /usr/local/sbin/*prg*, subbing useradd and adduser for *prg*

Of course, do that as root...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Which user accts in Redhat safe to delete? scottjwoodford Linux - Security 5 06-11-2005 11:21 AM
Samba PDC XP Pro client and Outlook Express user accts alans Linux - Networking 2 11-27-2004 03:02 PM
XMMS permissions on user accts seanmaggs Linux - Software 4 03-28-2004 08:40 AM
Is there a way to sync Samba passwords with linux user passwords MarleyGPN Linux - Networking 2 09-09-2003 11:59 AM
Default Gnome setting for all new user accts. BlueBerry Linux - General 0 12-28-2001 02:32 PM


All times are GMT -5. The time now is 01:06 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration