- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- creating a user account from the command line
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2005 10:19 PM
07-16-2005 10:19 PM
i am using red hat 8.0 and i am trying to create a new user account from the command line using (useradd -p password username ).I have a problem in the password field : when i checked my /etc/shadow list, the password for the user username doesn't appear encrypted and also when i tried to login using this account i couldn't.Noting that i didn't encounter any problems if i use the gui or using ( useradd username and then passwd username from the command line).Is there somthing wrong in useradd -p password username or somthing else.....(the man useradd shows this format)
regards:
naji
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2005 11:18 PM
07-16-2005 11:18 PM
SolutionSo you either have to encrypt the password first, or use 2 commands to add the user, the 'useradd', followed by a 'passwd' command, i.e.:
useradd username
echo unencrypted-password | passwd --stdin username
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2005 11:20 PM
07-16-2005 11:20 PM
Re: creating a user account from the command line
use passwd command to give password for a user after adding him.
Regards,
Gopi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2005 11:24 PM
07-17-2005 11:24 PM
Re: creating a user account from the command line
# grub-md5-crypt
Password: <== type the account password here
Retype password: <== and type it again here
$1$JXyMo/$ZhK4zu4rKW9JrH83oNHJ22 <== this is the encrypted password in MD5 format
Because of the special characters that it will generate you have to single quote it when using it in useradd. For example"
# useradd -p '$1$JXyMo/$ZhK4zu4rKW9JrH83oNHJ22' account
HTH,
Ross
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2005 02:49 AM
07-18-2005 02:49 AM