LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-11-2006, 07:45 AM   #1
slacknewbie2
LQ Newbie
 
Registered: Feb 2006
Posts: 4

Rep: Reputation: 0
Unhappy question about /bin/false usage


I am having a problem on my Slackware 10.2 system where system users who have no home directory get root access. The displayed message is: No directory, logging in with HOME=/. I also see this: /dev/pts/2: Operation not permitted. I seemed to have solved the second one by copying the /etc/passwd line for these users from a FC4 machine that I have. When I su - to these users though, I get put in the root directory as root which is not good. In this instance, it is the named user. Can someone explain the /etc/passwd file entry to me in detail so that I can figure this out?

Dave
 
Old 02-11-2006, 08:43 AM   #2
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 47
Try `man 5 passwd`.
You could also post your /etc/passwd here, so we could help you figure out.
What exactly do you call "root access"? $HOME=/root? Or really root access rights?
 
Old 02-11-2006, 11:21 AM   #3
slacknewbie2
LQ Newbie
 
Registered: Feb 2006
Posts: 4

Original Poster
Rep: Reputation: 0
Using the following line:

nobody:x:99:99:::bin/false

if I su - nobody

I am put into the / directory as root.

This line which is based on the one from my FC4 box:

nobody:x:99:99:Nobody:/:/bin/false

gives a different result if I try to su - nobody. With this line, nothing happens. I believe that is the desired result.

Thanks,
Dave
 
Old 02-11-2006, 12:16 PM   #4
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 47
In /etc/passwd fields are separated by a colon (":").

The first 4 lines are the same (account,password,UID,GID).
The 5th field (GECOS) is optional and ignored.

The 6th field is the user's home directory. In your first case it is empty, which is why you get the message "No directory, logging in with HOME=/.". In the second case it is "/" so there's no message then. But in both cases the HOME dir becomes /.

The 7th field is the program run at login, normally the shell. In both cases it is /bin/false, although I am unsure if the first is correct as the leading "/" is missing. Try adding it.

For information, this is my /etc/passwd on a Slackware 10.2 system:
Code:
root:x:0:0::/root:/bin/bash
bin:x:1:1:bin:/bin:
daemon:x:2:2:daemon:/sbin:
adm:x:3:4:adm:/var/log:
lp:x:4:7:lp:/var/spool/lpd:
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/:
news:x:9:13:news:/usr/lib/news:
uucp:x:10:14:uucp:/var/spool/uucppublic:
operator:x:11:0:operator:/root:/bin/bash
games:x:12:100:games:/usr/games:
ftp:x:14:50::/home/ftp:
smmsp:x:25:25:smmsp:/var/spool/clientmqueue:
mysql:x:27:27:MySQL:/var/lib/mysql:/bin/bash
rpc:x:32:32:RPC portmap user:/:/bin/false
sshd:x:33:33:sshd:/:
gdm:x:42:42:GDM:/var/state/gdm:/bin/bash
pop:x:90:90:POP:/:
nobody:x:99:99:nobody:/:
pu:x:1000:1000:,,,:/home/pu:/bin/bash
sy:x:1001:100:,,,:/home/sy:/bin/bash
clamav:x:1004:1004::/home/clamav:

Last edited by uselpa; 02-11-2006 at 12:17 PM.
 
Old 02-15-2006, 10:25 AM   #5
slacknewbie2
LQ Newbie
 
Registered: Feb 2006
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks. That helped.

Dave
 
  


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
/bin/false vs /sbin/nologin - difference? ziggie216 Linux - General 1 12-22-2005 02:59 AM
problems with /bin/false reactnet Slackware 5 08-29-2005 10:19 PM
SSH Problem /bin/false ultrix Linux - Security 2 06-17-2005 07:31 AM
Stupid mistake - changed root shell to /bin/false Kholnuu Linux - General 8 01-04-2005 03:48 AM
root /bin/false problem kaboom Linux - Newbie 6 10-24-2003 07:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:59 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