Run fsck from standard login


 
Thread Tools Search this Thread
Operating Systems Solaris Run fsck from standard login
# 1  
Old 12-13-2007
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.
# 2  
Old 12-13-2007
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

Last edited by Smiling Dragon; 12-13-2007 at 07:26 PM.. Reason: Another idea
# 3  
Old 12-13-2007
BTW, how did you get on with your filesystem corruption problem?
(How to correctly allocate size while creating FileSystem)
# 4  
Old 12-13-2007
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?
# 5  
Old 12-13-2007
Quote:
Originally Posted by panchpan
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.
# 6  
Old 12-16-2007
Java

Quote:
Originally Posted by panchpan
2) What you mean by 'turn on loggin on the FS' - How to do that?
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.

Quote:
Originally Posted by panchpan
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?
Porter's hit this problem right on the head by the sounds of it - do what he said Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Disk corruption? Cant run fsck....

NOTICE: /: unexpected free inode 45262, run fsck(1M) fsck: cannot open vfstab Looks like /etc/vfstab (and a few other files has gone) Any ideas? Boot from cd, mount disk and recreate vfstab so that I can run fsck? (1 Reply)
Discussion started by: psychocandy
1 Replies

2. Solaris

unable to repair the / filesystem. Run fsck manually (fsck -F ufs /dev/rdsk/c1t0d0s0)

What can I fix this issue? I have ran below commands but everything is same.:confused: WARNING: Last shutdown is later than time on time-of-day chip: check date. The / file system (/dev/rdsk/c1t0d0s0) is being checked WARNING - unable to repair the / filesystem. Run fsck manually (fsck -F... (4 Replies)
Discussion started by: getrue
4 Replies

3. Solaris

Not able to run fsck on root file system

I am trying to root disk mirroring on SunFire V210 Server. There are two disks on this server c1t0d0 and c1t1d0 . I completed all the steps and I updated the vfstab file too. After I have updated the vfstab file I run df -h command but could not see the changes i made in vfstab. Suddenly the server... (1 Reply)
Discussion started by: newbi8321
1 Replies

4. UNIX for Dummies Questions & Answers

Run fsck on root file system

If i run fsck on one filesystem and fsck need to repair some things then this partition must be unmounted correct ? So running fsck on root file system isn't possible within same OS ? correct ? What is the best way to do that, live cd ? BR, Jurif (5 Replies)
Discussion started by: jurif
5 Replies

5. HP-UX

fsck doesn't work - not even run?

Hi, please consider, I'm pretty new to HP-UX, thanks. Our server (rp7420 with HP-UX 11.31) has crashed due to disk write error (not boot partition). So I replaced damaged device with the new one of the same size and performed dd copy 1:1 to restore data - vxfs partition "/dev/vg01/lvol1"... (4 Replies)
Discussion started by: Morhoo
4 Replies

6. UNIX for Dummies Questions & Answers

Having a run fsck manually problem...

so i am pretty dumb when it comes to unix. but i am in the navy and the system i work on is unix based. and we have come across this problem. COULD NOT FIX FILE SYSTEM WITH fsck -P, RUN fsck INTERACTIVELY! LOGGING IN AS root FOR MANUAL fsk, ENTER ^D WHEN FILE SYSTEM FIXED (in bcheckrc)# ... (4 Replies)
Discussion started by: afouts
4 Replies

7. HP-UX

fsck! How to run Full File System Check

Dear all I am new for HP-UX. I have HP rp2470 running HP-UX 10.x When i run fsck in a root, the output is as below: #:root> fsck fsck: /dev/vg00/rlvol1: mounted file system continue (y/n)? y ** /dev/vg00/rlvol1 ** Last Mounted on /stand ** Phase 1 - Check Blocks and Sizes ** Phase... (3 Replies)
Discussion started by: hungevntelecom
3 Replies

8. Solaris

fsck run

Hi, Can anybody tell me that is it the command "fsck" can be run by the root account only? Thanks. (2 Replies)
Discussion started by: efang
2 Replies

9. UNIX for Dummies Questions & Answers

run fsck on swap slice?

Hi.. i am using sun solaris...and this is the filesystem information... you can see th slice(swap) c0t0d0s1 is giving some absord information......and during rebooting it is asking to run fsck mnually..when i run fsck manually it is giving error incorrect starting and end header...smthing like... (1 Reply)
Discussion started by: Prafulla
1 Replies

10. UNIX for Dummies Questions & Answers

Standard login shell

Hello By default for root the login shell is /bin/sh. In the file /etc/passwd I changed it to /bin/bash. (/bin/bash does exists!) After I logged out and in again I still have /bin/sh as the shell and not /bin/bash. Are the more files to be edited? I am using SCO-Unix. I am thankfull for any... (4 Replies)
Discussion started by: Fwurm
4 Replies
Login or Register to Ask a Question