vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Dear slackers, I have no idea what the solution to my problem might be, so I turn to you. The short of it is that I can no longer su to root. If I run su I get the following output: ~$ su Password: Sorry. ~$ I still am able to log in as root, so I think something must be wrong with my own useraccount, but I don't know what. I did not forget root's password, in any case. Likewise, I have also become unable to mount my iPod, which formerly I could. Root can still mount it, fstab formerly said, and still says /dev/ipod /mnt/ipod vfat noauto,defaults,gid=100,user but I can't. I googled about the su issue, but the only fix I saw concerned the permissions for su, and they are correct on my box (I checked against the package from which it originated). Now, what I'm looking for is a way to fix my user-acount, so that I'm able to su again, and so that I can mount partitions which users should be able to mount again. To clarify, all this happened after I made some changes to my partitions. It's a long story so I'll only mention what I think is most important. I have Slackware 10.1 installed on two Reiserfs partitions, one for / and one for /home. Among other things, (1) I added a partition, which effectively moved Slackware from /dev/hda8 and /dev/hda9 to /dev/hda9 and /dev/hda10 (and afterwards changed fstab accordingly, reinstalled grub to the boot record of root, etcetera; I re-installed grub many times, I load it from ntldr, the winXP boot manager). (2) I imaged, restored, shrinked and then enlarged my root partition (in that order, to counter some unexpected side-effects of restoring an image to a larger partition), after which reiserfsck prompted my to run with the option --rebuild-tree. After that I was able to login as root again, and for root everything seemed to work fine. (3) I imaged and restored my /home-partition, and then zipped (to a fat-drive) and unzipped the /home/'my account'-folder. Somewhere I must have done something wrong, but I don't know what, or what might have changed. I did check the file-permissions in my home-folder, but all files seem to be owned by me, and group users, so I'd say nothing's wrong there. I also erased all temp-files that were associated with my user-account, but to no avail. Well, I hope you have some further ideas to solve this. If this is the wrong place for my question I'll check elsewhere, just tell me. Regards, PJ |
| |||
| to mount my ipod as user...i have this in my /etc/fstab: /dev/sda2 /mnt/ipod/ vfat noauto,users,rw 0 0 i can mount it as user and it works fine, so i'd say try that entry and see if it works. btw...why does it show ipod under dev? just out of curiousity, what do you use to interface with your ipod? gtkpod? |
| |||
| buzzedlightyear wrote: > to mount my ipod as user...i have this in my /etc/fstab: > /dev/sda2 /mnt/ipod/ vfat noauto,users,rw > 0 0 > i can mount it as user and it works fine, so i'd say try that entry and > see if it works. Well, I'd be surprised if it did, because before I was able to mount it myself fine, I'll try though. > btw...why does it show ipod under dev? just out of > curiousity, what do you use to interface with your ipod? gtkpod? I have a 2.6 kernel installed and use udev. It works like this; in /etc/udev/rules.d/udev.rules I added the following as the first rule: BUS="scsi", SYSFS{model}="iPod ", KERNEL="sd?2", NAME="%k", SYMLINK="ipod" (I found this on the gtkpod-page, and yes, I do use gtkpod, works great After that, when I plug in my iPod it can be mounted as /dev/ipod. PJ |
| |||
| PJ Beers wrote: > buzzedlightyear wrote: >> to mount my ipod as user...i have this in my /etc/fstab: >> /dev/sda2 /mnt/ipod/ vfat noauto,users,rw >> 0 0 >> i can mount it as user and it works fine, so i'd say try that entry and >> see if it works. > > Well, I'd be surprised if it did, because before I was able to mount it > myself fine, I'll try though. Just tried it, to no avail: ~$ mount /dev/sda2 mount: must be superuser to use mount ~$ PJ |
| |||
| buzzedlightyear wrote: > try 'mount /mnt/ipod' ...its mountpoind instead of the device > itself...thats what i do. maybe your's is just borked though. Doesn't work either. I don't think the problem is in fstab or with the iPod, which I can use perfectly well if I mount it as root: ~# mount -o uid=1000 /dev/ipod /mnt/ipod works perfectly. I'm not sure whether I need the uid=1000 bit, but it doesn't hurt No, I think something's wrong with my user-account, something that would explain both the su problem and the mount problem; if only I knew what... PJ |
| |||
| On Mon, 06 Jun 2005 22:08:21 +0200, PJ Beers wrote: > If I run su I get the following output: > > ~$ su > Password: > Sorry. Check that the permissions on "su" are correct, on my box it looks like: ~$ ls -l /bin/su -rws--x--- 1 root wheel 35780 2004-06-21 21:20 /bin/su* Which means users should be in the "wheel" group for them to access it at all ("menno" is, but "pan" is not, etc.) And as it's a SUID binary when is does get run, it will be executed with the privileges of the user owning it, rather then the user that spawn it (root in this case). Try something like: gpasswd -a pj wheel chgrp wheel /bin/su chmod 4710 /bin/su If this seems to make no sense, here is a more elaborate attempt of mine to explain the SUID concept: http://groups-beta.google.com/group/...eacf7c3639f04f Another thing concerning /bin/su , maybe the authentication method or user/group authorization configured in you /etc/suauth , for that read: man suauth > I still am able to log in as root, so I think something must be wrong > with my own useraccount, but I don't know what. I did not forget root's > password, in any case. > > Likewise, I have also become unable to mount my iPod, which formerly I > could. Root can still mount it, fstab formerly said, and still says > > /dev/ipod /mnt/ipod vfat noauto,defaults,gid=100,user > > but I can't. Here again "mount" needs root (or actually EUID 0) privileges to work, so change the permissions to suid, like: chgrp wheel /bin/mount for p in go-rwx g+x u+srwx ; do chmod $p /bin/mount ; done > I googled about the su issue, but the only fix I saw concerned the > permissions for su, Which are very likely to be the problem indeed. > and they are correct on my box (I checked against the package from > which it originated). Are you really sure about that? -- -Menno. |
| |||
| Menno Duursma wrote: > On Mon, 06 Jun 2005 22:08:21 +0200, PJ Beers wrote: > >>If I run su I get the following output: >> >>~$ su >>Password: >>Sorry. > > Check that the permissions on "su" are correct, on my box it looks like: > > ~$ ls -l /bin/su > -rws--x--- 1 root wheel 35780 2004-06-21 21:20 /bin/su* > > Which means users should be in the "wheel" group for them to access it at > all ("menno" is, but "pan" is not, etc.) And as it's a SUID binary when is > does get run, it will be executed with the privileges of the user owning > it, rather then the user that spawn it (root in this case). > > Try something like: > > gpasswd -a pj wheel > chgrp wheel /bin/su > chmod 4710 /bin/su <snip> On my box, permissions are: ~$ ls -l /bin/su -rwx--x--x 1 root root 35780 2005-06-05 21:32 /bin/su* Now I took a risk, and removed and reinstalled the shadow-package (from Slackware 10.1, the same version as I was using, from which /bin/su originated). Now I get: ~$ ls -l /bin/su -rws--x--x 1 root bin 35780 2004-06-21 21:20 /bin/su* Apparently, I _did_ miss one important part of the permissions, i.e. the 's'-bit. Can it be that the 's'-bits were changed during all the imaging and resizing operations? By the way, I never noticed that before, to be honest... Is that what you called the SUID-bit? How can I set the suid? (Already found that out, see below.) Also, if I understand correctly I don't need to make use of the wheel-group if I leave su executable by others, as it is now... Anyway, reinstalling the shadow-package did solve the su problem, so thanks already! So next... Might the above mean that permissions on mount have changed? Right now I have: ~$ ls -l /bin/mount -rwxr-xr-x 1 root root 61308 2005-06-05 21:32 /bin/mount* and in the original package it says -rwsr-xr-x... Can it be that imaging and restoring, and/or resizing partitions may have changed all the suid-permissions to x-permissions? And how do I set the suid-permission? Currently my suid-binaries are: ~$ find / -type f -perm +4000 -ls 2>/dev/null 48188 36 -rws--x--x 1 root bin 35780 Jun 21 2004 /bin/su 57940 32 -rws--x--x 1 root bin 29492 Jun 21 2004 /usr/bin/chfn 57941 28 -rws--x--x 1 root bin 27780 Jun 21 2004 /usr/bin/chsh 57942 36 -rws--x--x 1 root bin 34540 Jun 21 2004 /usr/bin/chage 57943 20 -rws--x--x 1 root bin 16652 Jun 21 2004 /usr/bin/expiry 57944 20 -rws--x--x 1 root bin 19948 Jun 21 2004 /usr/bin/newgrp 57945 40 -rws--x--x 1 root bin 37880 Jun 21 2004 /usr/bin/passwd 57946 36 -rws--x--x 1 root bin 34616 Jun 21 2004 /usr/bin/gpasswd Also, how do I find out which files originally had the suid-bit? I thought of ~$ cat /var/log/packages/* |grep rws, but that didn't help <snip> > Here again "mount" needs root (or actually EUID 0) privileges to work, so > change the permissions to suid, like: > > chgrp wheel /bin/mount > for p in go-rwx g+x u+srwx ; do chmod $p /bin/mount ; done Ok, I did the following: ~$ ls -l /bin/mount -rwxr-xr-x 1 root root 61308 2005-06-05 21:32 /bin/mount* ~$ su /home/pj# for p in go-rwx g+x u+srwx ; do chmod $p /bin/mount ; done # exit exit ~$ ls -l /bin/mount -rws--x--- 1 root root 61308 2005-06-05 21:32 /bin/mount* and then changed my mind and did: /home/pj# for p in go+x g+x u+srwx ; do chmod $p /bin/mount ; done Anyway, this seems to have helped again! Thanks very much, the link to your explanation of chmod did help alot. PJ > > >>I googled about the su issue, but the only fix I saw concerned the >>permissions for su, > > > Which are very likely to be the problem indeed. > > >>and they are correct on my box (I checked against the package from >>which it originated). > > > Are you really sure about that? > |
| |||
| This is just to make a long story short, my previous post was overly elaborative; the following is what was important: Can it be that imaging and restoring, and/or resizing partitions changed all the suid-permissions to x-permissions? - and - How do I find out which files originally had the suid-bit? I.e., after a fresh Slack-10.1 install? - finally - Your (Menno's) explanation of _suid_, not _chmod_, helped a lot! Thanks. To clarify, I'm still a bit to Linux, and to Slackware especially Cheers! PJ |
| ||||
| On Tue, 07 Jun 2005 02:02:38 +0200, PJ Beers wrote: > Can it be that imaging and restoring, and/or resizing partitions > changed all the suid-permissions to x-permissions? Depending on the exact way one has gone about "imaging" : yes. (A simple "cp" or "tar" without "p" would do that, for instance.) > How do I find out which files originally had the suid-bit? > I.e., after a fresh Slack-10.1 install? Get the manifest from here: ftp://ftp.slackware.com/pub/slackwar...0.1/slackware/ Then search through it for the information you seek i.e.: bzcat MANIFEST.bz2 |grep "\-rws" -- -Menno. |