1

I've a debian 6 installed on a server.

I installed ingres on this server, which runs now with the user "ingres", I want to connect to ssh with the ingres user(for many reason, one of them is that when I do "su ingres", it seems that commands stored in .profile file are not executed).

The user has a /home/ingres folder, bash as console, but when I try to connect I got an "Access denied" error.

When I created the user I didn't specify any user, so I ran the

usermod -pThePasswordHere ingres

and I'm sure that I'm using the same password to connect to ssh.

But I still get my errors:

login as: ingres [email protected]'s password: Access denied 

What did I miss?

2 Answers 2

1

Try using

passwd username 

and then type in the password for the user name.

Also make sure that the password your are entering is correct by typing it slowly. Sometimes I jumple up some letters in my password, so thats a possibility.

Make sure that ingres was added to the ssh users as well.

3
  • I just found the same solution, it seems that usermod -pThePassword ingres wasn't working! With passwd it's okay Commented Aug 9, 2011 at 6:03
  • glad i could help Commented Aug 9, 2011 at 6:21
  • J4N: usermod -p requires encrypted password as an argument so unless you are hardcore enough to encrypt passwords real time in your head, that is not a recommended way for setting up passwords. :-) Commented Aug 9, 2011 at 8:26
0

Use the password command to set the password for a user. If you want to script setting the password, take a look at chpasswd.

What you did when you used usermod -p to set the password was to overwrite the crypted password as it's written in /etc/shadow, so what you would have needed to do to set your password to ThePassword with usermod would have been:

usermod -p '$6$f2ob/Bhg$EPzlpkg7INdDxeuisOXOffKJddbLUFXdHLe6V7dFUQccLQ2CX9Pu2I8WJam2uZY4peh8EHHeLwwMW5mW3cHwz/' password 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.