[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: Adduser: strange -p option on RH5.2



On Tue, 3 Aug 1999, Atul Chitnis wrote:

> > I am not sure if you have understood my problem, this is got nothing to do
> > with encryption. The problem is that what ever you give with -p option
> > from the command line to adduesr, just sits in the /etc/passwd passwd
> > field, mean it is not encrypted. Something like parameter with -p option
> > expects the admin to give an encrypted passwd this is strange to me
> 
> I just checked adduser and useradd in RedHat Linux 6.0 - no sign of a -p
> flag (man adduser or man useradd).

Nope, rh6.0 useradd has that option, only it's not documented in the man 
page.  Just typing useradd brings up the options and -p is one of them.  
'-p passwd' is how it's mentioned. And it behaves exactly like chetan 
said.  In rh6.0 the string entered after the -p goes as is to the shadow  
file. (The -p option exists for usermod also.) By coincidence i happened  
to use it too yesterday just  before i saw chetan's first message. 

And by the way, a really naive question. When a new user is created with 
useradd, what is the default password set by the system? I just couldnt  
figure this out, and couldnt do a login. That's how i came to use that -p.
A simple 'useradd name' created a '!!' entry in the encrypted password 
field in /etc/shadow. I then tried 'passwd -u name', as mentioned in the man 
page for passwd, to unlock the password, if that's what it was. This 
didnt work, so i then used 'passwd -f name' to create a new password for the 
new user.

- -- prakash


- --------------------------------------------------------------------
For more information on Linux in India visit http://www.linux-india.org/
The Linux India mailing list does not accept postings in HTML format.

------------------------------