Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
04-08-2006, 10:00 AM
|
#1
|
Member
Registered: Dec 2005
Distribution: CentOS 5 - Debian 5
Posts: 112
Rep:
|
Is this possible....no home directory
Is it possible to create a user just for tunneling?? so the system authenticate him but he does not have a home directory so he can not login and browse the system......i am using this account from different terminals and in case someone was tracking what i actually type(id/pass) it will not be that series.....
thnx,
|
|
|
04-08-2006, 12:08 PM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
yes, that's totally possible, just set their shell to something like /sbin/nologin their home to /dev/null and whilst they can authenticate they can not actually log in.
|
|
|
04-08-2006, 12:45 PM
|
#3
|
Member
Registered: Dec 2005
Distribution: CentOS 5 - Debian 5
Posts: 112
Original Poster
Rep:
|
brilliant....thank you very much.
I got this when I tried to login
Code:
Could not chdir to home directory /dev/null: Not a directory
This account is currently not available.
can i change the message??!! or eliminate it all??!! let us say this user is from a certain group and i want to issue a specific message for this group...
*EDIT*
The user is not connected....so I can not actually use this method for tunneling!!! Any suggestions??
Code:
/usr/sbin/useradd -s/sbin/nologin -d/dev/null someuser
Last edited by piforever; 04-08-2006 at 12:48 PM.
|
|
|
04-09-2006, 12:48 PM
|
#4
|
Senior Member
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900
Rep:
|
Try - though possibly it's less secure (I don't see why would it, but...) - setting 'shell' to some Unix-shell script echoing various curses and exiting.
|
|
|
04-09-2006, 01:38 PM
|
#5
|
Member
Registered: Dec 2005
Distribution: CentOS 5 - Debian 5
Posts: 112
Original Poster
Rep:
|
Can you give me an example??
|
|
|
04-09-2006, 05:03 PM
|
#6
|
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290
|
What kind of tunneling do you want the user to be able to do? If you just want him to tunnel HTTP traffic, you might be better served just setting up Squid or another proxy server.
I'm not sure if there's an easier way to do it than to write a little "shell" that basically just holds the connection open for the proxy traffic. At this point you might be even better served by implementing a simple SSL-based VPN so you don't have to mess with it. There are packages like FreeSwan that can help but I haven't ever used them.
|
|
|
04-10-2006, 01:44 AM
|
#7
|
Member
Registered: Aug 2004
Location: India
Distribution: Redhat 9.0,FC3,FC5,FC10
Posts: 257
Rep:
|
Does this help..or did I miss something??
***********
[arvind@arvind Scripts]$ su -
Password:
[root@arvind ~]# useradd -s /sbin/nologin -u 61111 -g 10 -c "VPN User" vpn
[root@arvind ~]# passwd vpn
Changing password for user vpn.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
[root@arvind ~]# grep vpn /etc/passwd
vpn:x:61111:10:VPN User:/home/vpn:/sbin/nologin
[root@arvind ~]# su - vpn
This account is currently not available.
[root@arvind ~]#
***********
|
|
|
04-10-2006, 06:47 PM
|
#8
|
Member
Registered: Dec 2005
Distribution: CentOS 5 - Debian 5
Posts: 112
Original Poster
Rep:
|
Quote:
Originally Posted by live_dont_exist
Does this help..or did I miss something??
|
Thanx....but this is not what we are talking about....
|
|
|
04-10-2006, 06:51 PM
|
#9
|
Member
Registered: Dec 2005
Distribution: CentOS 5 - Debian 5
Posts: 112
Original Poster
Rep:
|
Quote:
Originally Posted by btmiller
What kind of tunneling do you want the user to be able to do? If you just want him to tunnel HTTP traffic, you might be better served just setting up Squid or another proxy server.
I'm not sure if there's an easier way to do it than to write a little "shell" that basically just holds the connection open for the proxy traffic. At this point you might be even better served by implementing a simple SSL-based VPN so you don't have to mess with it. There are packages like FreeSwan that can help but I haven't ever used them.
|
Thanx.....nice info, i'm looking at this at the moment....i'll post back if i successfully implemented those ideas....
|
|
|
04-12-2006, 10:12 PM
|
#10
|
Member
Registered: Jun 2002
Location: Netherlands - Amsterdam
Distribution: RedHat 9
Posts: 549
Rep:
|
Check the prog below, I read about it at packetstormsecurity but haven't tested it myself:
Sleep Dummy Shell
This is a simple do-nothing, sleep-forever program that can be used as a login shell (in Linux or Unix) to keep the connection open but without interactive shell. We use it to create SSH accounts for users who will only use them for SSH-tunneling; to create an encrypted tunnel to our servers (for example to connect securely to database servers like mySQL, PostgreSQL, etc).
http://www.mariovaldez.net/software/sleepshell/
Last edited by pk21; 04-12-2006 at 11:02 PM.
|
|
|
04-13-2006, 12:55 PM
|
#11
|
Member
Registered: Dec 2005
Distribution: CentOS 5 - Debian 5
Posts: 112
Original Poster
Rep:
|
WOW!! You are my savior.....just what I was looking for....
Regards,
The site is a bit scary!!
Last edited by piforever; 04-13-2006 at 01:20 PM.
|
|
|
04-13-2006, 07:58 PM
|
#12
|
Member
Registered: Jun 2002
Location: Netherlands - Amsterdam
Distribution: RedHat 9
Posts: 549
Rep:
|
pk21 to the rescue
Source code looks very simple, but is seems to work fine. Even has some sort of keepalive(an asterisk every 10-seconds)
|
|
|
04-14-2006, 05:19 AM
|
#13
|
Member
Registered: Dec 2005
Distribution: CentOS 5 - Debian 5
Posts: 112
Original Poster
Rep:
|
Thanx for that...I was thinking...whether the code is efficient and no vulnerabilities are associated with it?? I will go for it then...many thnx
|
|
|
All times are GMT -5. The time now is 02:52 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|