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
ingres@192.168.xxx.yyy's password:
Access denied

What did I miss?

J4N
  • 167
  • 1
  • 2
  • 8

2 Answers2

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.

Vish
  • 176
  • 5
  • I just found the same solution, it seems that usermod -pThePassword ingres wasn't working! With passwd it's okay –  Aug 09 '11 at 06:03
  • glad i could help –  Aug 09 '11 at 06: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 09 '11 at 08: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
Uli Martens
  • 121
  • 1