Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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's password:
Access denied

What did I miss?

share|improve this question

migrated from Aug 9 '11 at 8:21

This question came from our site for professional and enthusiast programmers.

up vote 1 down vote accepted

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.

share|improve this answer
I just found the same solution, it seems that usermod -pThePassword ingres wasn't working! With passwd it's okay – J4N Aug 9 '11 at 6:03
glad i could help – user658911 Aug 9 '11 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. :-) – Janne Pikkarainen Aug 9 '11 at 8:26

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
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.