LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   setting up a guest account, nopasswd, and quota (https://www.linuxquestions.org/questions/linux-security-4/setting-up-a-guest-account-nopasswd-and-quota-4175645113/)

BW-userx 12-28-2018 12:32 PM

setting up a guest account, nopasswd, and quota
 
I go tas far as creating a user with passwd, for starters, then fstab adding usrquota, and the file in /home

then when I got to check it, I got this message
Code:

$ sudo quotacheck -vgum -F ext4  /home
quotacheck: Unknown quota format: ext4
Supported formats are:
  vfsold - original quota format
  vfsv0 - standard quota format
  vfsv1 - quota format with 64-bit limits
  rpc - use RPC calls
  xfs - XFS quota format

so quota user size homes can only be restricted by them formats and not ext4????

and how to do this for good mesure.



http://www.yolinux.com/TUTORIALS/Lin...ialQuotas.html

dc.901 12-28-2018 12:50 PM

Have you tried without "-F", so:

Code:

sudo quotacheck -vaug /file_system
Reference: https://access.redhat.com/documentat...-keep-accurate

BW-userx 12-28-2018 01:25 PM

Quote:

Originally Posted by dc.901 (Post 5942181)
Have you tried without "-F", so:

Code:

sudo quotacheck -vaug /file_system
Reference: https://access.redhat.com/documentat...-keep-accurate


this is VOID Linux and not Red Hat but that is all I could find everything else pointed back to that reference, how to.


without the -F it says it has no idea of file type

app name is 'quota'
Code:

$ sudo quotacheck -vgum  /home
quotacheck: Cannot guess format from filename on /dev/sda2. Please specify format on commandline.
quotacheck: Cannot find filesystem to check or filesystem not mounted with quota option.



userx@VoiDED.org:~
$ sudo quotacheck -vaug  /home
Bad number of arguments.
Utility for checking and repairing quota files.
quotacheck [-gucbfinvdmMR] [-F <quota-format>] filesystem|-a

-u, --user                check user files
-g, --group              check group files
-c, --create-files        create new quota files
-b, --backup              create backups of old quota files
-f, --force              force check even if quotas are enabled
-i, --interactive        interactive mode
-n, --use-first-dquot    use the first copy of duplicated structure
-v, --verbose            print more information
-d, --debug              print even more messages
-m, --no-remount          do not remount filesystem read-only
-M, --try-remount        try remounting filesystem read-only,
                          continue even if it fails
-R, --exclude-root        exclude root when checking all filesystems
-F, --format=formatname  check quota files of specific format
-a, --all                check all filesystems
-h, --help                display this message and exit
-V, --version            display version information and exit

Bugs to jack@suse.cz

fstab
Code:

$ cat /etc/fstab
UUID=16813c62-7cf0-4bd8-9ae4-cf23da361484 / ext4 defaults 0 1
UUID=1312898c-92a0-4a23-94d4-7ccb3b64dc29 /home ext4 defaults,usrquota,grpquota 0 2

/dev/sda3 /media/data1  ntfs-3g defaults 0 2

tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0

files in home
Code:

$ ls -l  /home
total 24
-rw-------  1 root  root      0 Dec 28 12:14 aquota.user
drwx--x--x  5 guest users  4096 Dec 28 12:10 guest
drwx------  2 root  root  16384 Dec 27 11:00 lost+found
-rw-------  1 root  root      0 Dec 28 12:21 quota.user
drwx------ 24 userx userx  4096 Dec 28 12:23 userx


BW-userx 12-28-2018 01:50 PM

I just found this using a different search pattern

https://wiki.archlinux.org/index.php/disk_quota

now to see about setting the actual limits on guest.

here is another one in case someone checks this out
http://elinuxbook.com/managing-disk-usage-with-quota/


All times are GMT -5. The time now is 05:17 PM.