Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
Sorry but I am a and I have a few stupid questions but:
a.) When creating a telnet/SSH server, how can I create/edit a greeting message?
b.) How can you limit a users commands from a shell? Ex. A "user creating" user to just have a command to create users and a logout command.
I have looked all around to no avail for both of these questions... perhaps it is not possible, but I think I have come to the right place to find that out.
As far as I can see, using forced commands can do exactly what you need. (i.e. associating a file with a particular ssh user, listing the command they're allowed to run). Even though this is only a sample chapter, it's the right one :http://www.oreilly.com/catalog/sshtd...h08.html#22858.
It may require a little more research into how exactly to implement it, but I hope this at least gives some useful search terms
G'luck (and I learned something in looking this up, too!) Let me know how it goes,
-Laura
Last edited by rose_bud4201; 03-29-2004 at 07:59 PM.
Hmmmm.... just went and looked at my /etc/motd file and it seems to be empty. Have you found anything pertaining to the format of the file? or even write to it in the first place
Nice and easy - just put the text in there For instance, my server says "Linux 2.4.20" when someone connects. I did a 'cat /etc/motd' and 'Linux 2.4.20' comes back. It seems like sshd just dumps the contents of that file to the user
Code:
bash-2.05b$ ssh 127.0.0.1
laura@127.0.0.1's password:
Last login: Mon Mar 29 21:30:42 2004 from localhost
Linux 2.4.20.
laura@cleopatra:~$ exit
logout
Connection to 127.0.0.1 closed.
bash-2.05b$ cat /etc/motd
Linux 2.4.20.
bash-2.05b$
Last edited by rose_bud4201; 03-29-2004 at 08:31 PM.
It's generally good practive that you should the only user you ever allow to create user accounts is root. And you generally don't want to give anyone remote access to a super user account, they should be forced to log in as a normal user and then use su / sudo. If a user can create another user, then they can just reconnect as that user and run any commands they want, after all... so you wouldn't really be limiting much.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.