LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-11-2002, 03:53 AM   #1
saavik
Member
 
Registered: Nov 2001
Location: NRW, Germany
Distribution: SLES / FC/ OES / CentOS
Posts: 614

Rep: Reputation: 32
Question user without console access


Hello!
Can i create a use with can use samba
but can not log into a shell?
if yes, how?

CU
 
Old 03-11-2002, 02:13 PM   #2
nitr0gen
LQ Newbie
 
Registered: Feb 2002
Distribution: Homemade Slakware
Posts: 14

Rep: Reputation: 0
Lightbulb little tweak

this is a little tweak
create a shellscript /bin/nologin
give execute rights
chmod a+x /bin/nologin
write that into it:
!#/bin/sh
echo "Restricted acces get lost"

Append the shell name into /etc/shells
...
/bin/sh
/bin/nologin
...

then create the user and specify his shell /bin/login
next time the user will try to log on... He will see "Restricted access get lost"

happy tweaking
nitr0gen
 
Old 03-11-2002, 02:48 PM   #3
thecrab
LQ Newbie
 
Registered: Feb 2002
Location: Quebec, Canada
Distribution: RedHat and Mandrake
Posts: 9

Rep: Reputation: 0
maybe it could help...

I did that for my ftp user...
So now they can login on the ftp, but can't with a shell.
I had a /dev/null shell.

1. useradd -d /var/ftp/myuser/ -s /dev/null myuser > /dev/null 2>&1

2. created directory in /var/ftp/myuser

3.edited /etc/shells file to include /dev/null

4.edited /etc/passwd to read:myuser:x:502:502::/var/ftp/./myuser/:/dev/null
 
Old 03-13-2002, 10:18 AM   #4
saavik
Member
 
Registered: Nov 2001
Location: NRW, Germany
Distribution: SLES / FC/ OES / CentOS
Posts: 614

Original Poster
Rep: Reputation: 32
Unhappy complicated

seems a bit complicated to me!
is ther no easy way?
just delete the shel definition in the passwd!
is that working?
 
Old 03-14-2002, 07:25 AM   #5
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
Just removing it will work for most programs but some complain about it.
The easiest way would be to either change the shell to /dev/null or /bin/false and then also add that entry to /etc/shells.
But that's exactly what the other two people suggested.
 
  


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
I lose ftp access when I disable shell access for user captainObvious Linux - General 3 11-13-2004 05:49 PM
grant user access to /fat-c & copying users' preferences to another user n0x Linux - Newbie 1 07-04-2004 12:04 AM
access console in blackbox? cadkins Linux - Newbie 2 03-10-2004 04:22 PM
getting access denied , when trying to access camera as normal user bennythepitbull Linux - Hardware 2 11-04-2003 02:30 AM
more access?///console commands chiatello Linux - General 6 07-13-2003 02:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 11:06 AM.

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