How can I grant an already created user shell access?

Hi Guys,

Our server runs CentOS 6 here on Linode. I had created a user with the following command:

[root@myserver1 ~]# useradd -c "myApp FTP User" -s /bin/false -d /var/www/vhosts/myapp/httpdocs ftp.myapp

Now, it turns out that the (FTP) user I had created, ftp.myapp now requires shell access.

I have attempted to grant the user shell access by editing the sshdconfig file (which is located here /etc/ssh/sshdconfig)

I added these line to the file:

AllowUsers myApp

But when I try to login as this user via SSH (I use putty), after inserting the username and password on the command prompt, the screen exits.

What am I missing here?

I would appreciate any useful input/suggestions.

Thanks.

4 Replies

Try running chsh and change it to /bin/sh that will change the shell to the default one on the system

It turns out that I am not quite there yet.

I still need to grant this user root privileges or sudo rights for some of the admin work the user wants to carry out.

How can I achieve this?

Thanks.

I believe you can add an existing user to the admin group by using the usermod command.

It should be usermod -a -G sudo <username></username>

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct