WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Linux-pam and login  (Read 5626 times)

Offline perry

  • Newbie
  • *
  • Posts: 16
Linux-pam and login
« on: October 29, 2010, 05:33:10 PM »
Hi,

I installed linux-pam todat, but i found that while i login.
It is not used, do i have to enable something to get the login to use pam ?

Perry

Offline perry

  • Newbie
  • *
  • Posts: 16
Re: Linux-pam and login
« Reply #1 on: October 29, 2010, 10:26:21 PM »
Hi,

I recompiled busybox and replaced in tinycore.gz.

I used the following build scripts.

# Build busybox.
tar -xjvf busybox-1.17.0-3.tbz2
cd busybox-1.17.0/
cp ../busybox-1.17.0-3.config .config
make oldconfig
make
mkdir -p /tmp/busybox-build
make CONFIG_PREFIX=/tmp/busybox-build install

# Create the package nerdbox-busybox.
tar -C /tmp/busybox-build -czvf /root/nerdbox-busybox.tar.gz .

Is changed the config file, here is the patch:

--- busybox-1.17.0-3.config   2010-07-10 08:48:00.000000000 +0200
+++ busybox-1.17.0-3.config-nerdbox   2010-10-30 02:31:01.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Busybox version: 1.17.0
-# Sat Jul 10 11:41:42 2010
+# Sat Oct 30 00:18:08 2010
 #
 CONFIG_HAVE_DOT_CONFIG=y
 
@@ -448,7 +448,7 @@
 CONFIG_DELUSER=y
 CONFIG_GETTY=y
 CONFIG_LOGIN=y
-# CONFIG_PAM is not set
+CONFIG_PAM=y
 CONFIG_LOGIN_SCRIPTS=y
 CONFIG_FEATURE_NOLOGIN=y
 CONFIG_FEATURE_SECURETTY=y

Now busybox has pam support.

After i added the file to tinycore.gz i also added the Linux-PAM file to tinycore.gz.
And run chroot tinyconf ldconfig

And then recreated the tinyconf.gz.

cd tinycore
find | sudo cpio -o -H newc | gzip -2 > ../boot/tinycore.gz

After that i added the following line to /etc/pam.d/other and system-auth.

session  required       pam_mkhomedir.so

Now my tiny core linux has pam support and wil create home directory for a user is it does not exists.

perry

Offline gutmensch

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 605
  • I can make it disappear, have no fear!
    • remembrance blog
Re: Linux-pam and login
« Reply #2 on: November 05, 2010, 04:44:27 AM »
Nice work, perry! What's the difference in size between both busybox versions (with PAM and without PAM)? I think this should be a feature for the base...
If I seem unduly clear to you, you must have misunderstood what I said. (Alan Greenspan)

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: Linux-pam and login
« Reply #3 on: November 05, 2010, 06:15:42 AM »
Nice work, perry! What's the difference in size between both busybox versions (with PAM and without PAM)? I think this should be a feature for the base...
+1
   

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Linux-pam and login
« Reply #4 on: November 05, 2010, 08:09:50 AM »
PAM should be a choice. AFAIK enabling it in bb would cause a dep on libpam, while also disabling both bb's own password handling and login support without pam.

It causes slower logins, and is of no use in many systems. No reason to force it.
The only barriers that can stop you are the ones you create yourself.

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: Linux-pam and login
« Reply #5 on: November 05, 2010, 10:00:49 AM »
PAM should be a choice.
No objection to it being optional provided recompiling is not required.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Linux-pam and login
« Reply #6 on: November 05, 2010, 12:35:36 PM »
Having read quite a bit about the PAM controversy, I'd absolutely vote against including it in base, and in favour of keeping extensions free from depending on PAM, to the degree feasable.

Just my 2 cents...
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)