LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 01-02-2013, 02:33 PM   #1
victorp
LQ Newbie
 
Registered: Apr 2009
Posts: 7

Rep: Reputation: 0
passwd permissions


Hi

After installing samba4 on Ubuntu 12.10 i got an error. After restart i was not able to login.
Thus, booted in recovery mode, root shell and tried to change passwd <username>
But the command does nothing, doesn't ask for new password for the user. Simply returns.
Now, right after the command i did 'echo $?'
I see exit code '1'. Permissions denied.
But I am root!
Please help.

Victor.
 
Old 01-02-2013, 06:19 PM   #2
jonesr
Member
 
Registered: Feb 2008
Location: Sacramento
Distribution: RHEL AS, mostly
Posts: 44

Rep: Reputation: 18
Recovery mode assumes your system may really be broken, so it mounts the root file system in read-only mode to avoid making matters any worse. Try your password reset again after remounting the root file system in read-write mode with
Code:
mount -o remount,rw /
 
Old 01-03-2013, 03:54 AM   #3
victorp
LQ Newbie
 
Registered: Apr 2009
Posts: 7

Original Poster
Rep: Reputation: 0
passwd permission problem

Thanks, jonesr

Yes, i know about ro in recovery mode.
I remounted as rw of course before doing anything.
I suppose that installing samba4 broke something.
After remount i can edit the /etc/passwd and /etc/shadow files with vim.
I even tried to strace passwd <username>, its attached.
But i can't figure out from it where it faces with permissions problem.
Attached Files
File Type: log strace.log (47.9 KB, 24 views)
 
Old 01-03-2013, 05:22 AM   #4
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
Is nsswitch.conf using "files" as the first passwd data source?
 
Old 01-03-2013, 05:25 AM   #5
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
Are any passwd/shadow format errors shown by pwck ?
 
Old 01-04-2013, 03:29 PM   #6
victorp
LQ Newbie
 
Registered: Apr 2009
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks, linosaurusroot

I discovered a backup of nsswitch.conf
Right after i restored the backup, it worked.

Thanks for the tipp.
 
  


Reply

Tags
passwd, permissions, ubuntu 12.10



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
likewise open, passwd, samba permissions Linux.Girl Linux - General 1 12-19-2011 09:59 AM
Problem with /etc/passwd and /etc/passwd- files linuxravindra414 Linux - Newbie 2 01-15-2011 05:17 AM
/etc/shadow and /etc/passwd permissions question lqchangba Linux - Security 2 02-20-2007 12:46 PM
Swat uses PAM but changes linux passwd not samba passwd Peter@KKVS Linux - Networking 0 11-26-2006 04:20 AM
passwd permissions DiBosco Linux - General 1 01-19-2002 03:13 PM

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

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