LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-29-2004, 07:50 PM   #1
bopo119
LQ Newbie
 
Registered: Feb 2004
Location: Earth
Distribution: Mandrake 9.2
Posts: 14

Rep: Reputation: 0
Question Newbie Questions...


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.
 
Old 03-29-2004, 07:57 PM   #2
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Rep: Reputation: 30
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.
 
Old 03-29-2004, 08:03 PM   #3
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Rep: Reputation: 30
Oh, and the contents of the file /etc/motd is output to the ssh user upon connection to your server.
http://os2.ru/materials/internet/sshd.shtml.en
 
Old 03-29-2004, 08:06 PM   #4
bopo119
LQ Newbie
 
Registered: Feb 2004
Location: Earth
Distribution: Mandrake 9.2
Posts: 14

Original Poster
Rep: Reputation: 0
Wonderful. I am still a big newbie so if you find any more stuff go ahead and put it on here. At the moment, however, thank you.
 
Old 03-29-2004, 08:09 PM   #5
bopo119
LQ Newbie
 
Registered: Feb 2004
Location: Earth
Distribution: Mandrake 9.2
Posts: 14

Original Poster
Rep: Reputation: 0
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

Last edited by bopo119; 03-29-2004 at 08:24 PM.
 
Old 03-29-2004, 08:29 PM   #6
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Rep: Reputation: 30
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.
 
Old 03-29-2004, 08:41 PM   #7
bopo119
LQ Newbie
 
Registered: Feb 2004
Location: Earth
Distribution: Mandrake 9.2
Posts: 14

Original Poster
Rep: Reputation: 0
You must be root to edit it however correct? Do I have to restart my computer before /etc/motd will take effect?

Last edited by bopo119; 03-29-2004 at 08:59 PM.
 
Old 03-29-2004, 09:08 PM   #8
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Rep: Reputation: 30
Yes, you must be root. And restarting the machine shouldn't be necessary, but restarting sshd p'bly is.
 
Old 03-29-2004, 11:28 PM   #9
liamoboyle
Member
 
Registered: Mar 2004
Location: Wellington, New Zealand
Distribution: Debian
Posts: 127

Rep: Reputation: 15
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help the newbie...:D Got some questions... desperate_penguin Linux - Software 8 11-22-2005 07:34 AM
3 newbie questions Bry Linux - Newbie 13 02-22-2005 05:09 AM
Some newbie questions... koswo Linux - Newbie 7 02-04-2004 10:34 PM
Newbie questions ashley75 Linux - General 2 09-15-2003 12:59 PM
Newbie Questions Bucolic Buffalo Linux - Newbie 4 01-08-2003 08:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration