How can I grant an already created user shell access?
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 sshd_config file (which is located here /etc/ssh/sshd_config)
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.
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 sshd_config file (which is located here /etc/ssh/sshd_config)
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?
You don't have to edit anything with SSH, but the user you created above has the problem on the line you posted. Read the man page on useradd, and pay particular attention to the "-s" flag. You've specified the users shell to be /bin/false (i.e. NO login shell). So, modify the user with the usermod command, as "usermod -s /bin/bash <username>".
It turns out that I 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?
It turns out that I 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?
You add the user into the sudoers file, or give them the root password. There are many tutorials you can find on how to configure sudo/sudoers.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.