2

I have a file in /etc named radius which contains the user account details similar to /etc/passwd but of Radius users. How do I configure /etc/nsswitch.conf to check /etc/radius in addition to checking /etc/passwd when searching for local files? For example I have a line in my /etc/nsswitch.conf which says

passwd:     files nis

files here searches only in /etc/passwd. How do I make it search other files?

  • you can't use nsswitch.conf to remplqce /etc/passwd. this file is intented to switch between localfile, nis or dns. if /etc/radius is similar to passwd, just do a cat /etc/radius >> /etc/passwd – Archemar Oct 16 '14 at 12:56
  • I don't want the entries to be in /etc/passwd. I dont want to replace /etc/passwd but I want this file to be searched too in addition to /etc/passwd – user1449951 Oct 16 '14 at 13:00
  • can you give a sample of /etc/radius ? – Archemar Oct 16 '14 at 13:17
  • test::161:100:Test User:/:/bin/bash I have added a test user in radius server in users file like test Cleartext-Password:"test" – user1449951 Oct 16 '14 at 13:29
  • this look like /etc/passwd entry, you have to merge with /etc/passwd. I don't think of any switch in nsswitch.conf that will "add" /etc/radius to /etc/passwd. – Archemar Oct 16 '14 at 14:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.