Run fsck from standard login

Hello.
I have created a FS /u00/ and created a non-root login under this FS. Also, disabled direct root login. Now is it possible or worth moving this login over to the root partition or allowing mount/umount + fsck from a standard account. As I am not able to run fsck for this FS.

How to allow a standard login to mount/umount + fsck? worth?

Please advice.

Do you mean you've chown'ed this new filesystem to the user?
If you want to allow them to fsck the volume, it'd suggest using sudo so they can mount, unmount and fsck the relevant device/mount point.

It's a little wierd needing to give user's this power though, if you turn on logging on the filesystem, you shouldn't need to run fsck ever really.

Edit:
Another option would be to write a setuid shell script that does the unmount, fsck and mount again for them. Set it to be owned by root, executable by users in a particular group (but not world) and add the user to that group. You'll have to be jolly careful with the script though - setuid root is always dangerous if you are not very thorough doing your taint checking

BTW, how did you get on with your filesystem corruption problem?
(http://www.unix.com/sun-solaris/45044-how-correctly-allocate-size-while-creating-filesystem.html\#post302148832\)

That FS Corruption problem isnt solved yet, I am sitting remotely and have advised your tips to some one close to site. But yet to hear about further updates - i shall certainly keep that thread updated to share the knowledge on it.

1) I have not chown'ed the FS to user. Its owned by root only. But one user is present in this FS and same user is not able to run fsck for that FS where he is present.

2) What you mean by 'turn on loggin on the FS' - How to do that?

3) As the direct root login is disabled and I login from some login and then sudo to root. But this way isnt allowing to run FSCK for the FS where my login was present. Can I have this login present over in root partition?

Is this because the home directory is on the volume you want to FS so you can't umount it?

You may be able to force a umount. man umount.

Another approach is rather than do su or sudo, do "exec su -" to get to root from the login. This should effectively remove the parent program using the home directory.

It's a mount option that enables journelling on the filesystem. I'm still not totally comfortable using on on the boot filesystem** but it's fantastic on all others. (** It's probably fine on / also but I've had bad experiances with it on older versions of solaris, once bitten twice shy etc etc).
The logging option gives the filesystem a way to keep track of the transactions it's recently done. If you get a system crash, it can roll back any changes that wern't completed properly, leaving the filesystem in a known good state. You can usually get away with doing horrible things to a logging filesystem and never need to fsck it.

Edit /etc/vfstab
Find the line for your volume
Edit the 'mount options' column (the last one) to include 'logging'. If it's currently '-', just change the - to what you want. If there are existing options, add it to the list (it's comma seperated).
remount it and all should be good.

Porter's hit this problem right on the head by the sounds of it - do what he said :slight_smile: