Tag Info

New answers tagged

1

I had a similar problem when using rsync to backup my system to my server. I used: rsync -aAXSHPr \ -e ssh \ --rsync-path="sudo /usr/bin/rsync/" \ --numeric-ids \ --delete \ --progress \ --exclude-from="/path/to/file/that/lists/excluded/folders.txt" \ --include-from="/path/to/file/that/lists/included/folders.txt" \ / ...


0

go to Menu -> Administration -> Login Window Preferences -> Automatic Login Then uncheck any user that is set to auto login.


2

The Linux Kernel 2.6 and above supports unsigned 32-bit integers as UIDs and GIDs. This means the maximum UID should be 4294967294 (4294967295 is reserved) for RHEL4+ but it may depend on the system settings and utilities installed, specifically shadow-utils. You can test it out by trying a large UID, the only thing that would happen is it will reject it ...


2

All Unix systems have at least 16-bit user IDs, which can take values from 0 (reserved for root) to 65535 (reserved as an invalid value). Many modern flavors (including Linux) support larger values, but in a mixed network, you should avoid these unless you're sure that all operating systems, filesystems and network protocols support them (e.g. older versions ...


2

In Debian, the default groups are set up by base-passwd; the dialout group should always be present. If it isn't, you can use update-passwd to restore the expected configuration: sudo update-passwd (this will restore the system and user groups, but won't modify anything else). You simply need to add your user to the group: sudo adduser $(whoami) dialout ...


2

You can try the 'groupadd' command. user@system:~$ groupadd Usage: groupadd [options] GROUP Options: -f, --force exit successfully if the group already exists, and cancel -g if the GID is already used -g, --gid GID use GID for the new group -h, --help display this ...


3

65534 is some kind of default/nobody UID & GID value. Your VPS provider made some sort of mistake when they copied over your container. For example they used rsync but failed to use its --numeric-ids option. The user IDs inside your container don't exist outside the container and some copy tools, upon seeing UIDs and GIDs that they can't resolve, revert ...


0

I'm happy to do your homework for you, less competition in the job market: # cat /etc/passwd|awk -F\: '{ print $1 }'| sort | head -20


0

You can also count users with passwords in linux using /etc/shadow file: awk 'BEGIN { FS=":"; empty = 0; cnt = 0; } { if ($2 !~ "!" && $2 !~ "*") { if ($2 !~ "") emty++; else cnt++; } } END { print "passwords: " cnt "\nempty passwords: " empty }' /etc/shadow On FreeBSD I think you can use /etc/master.passwd


1

To find the number of lines in a file, simply use wc. To look at user accounts on a system, I recommend getent passwd, though there are many other equally valid ways of getting at this information. You can combine the two by passing the output of getent through wc: # getent passwd | wc -l to get a number representing the total number of user accounts ...


2

To get a list containing all group membership use id -a


9

The command that you must use for you is: id and for any other user: id username


0

If possible, pick the same user IDs for the same users on both systems. Filesystems identify users by their numerical user IDs. If you mount the CentOS home directory on Mint, the filesystem records CentOS user IDs, but user IDs may have been assigned differently on Mint. Let's say your CentOS user ID is 500 and your Mint user ID is 1000, and Mint has no ...


0

You have to use script /dev/null before using screen. After leaving screen you have to exit.


0

You can can mount a Centos partition in Mint mkdir -p /mycentos/home mount /dev/sdaX /mycentos/home Where sdaX is the name of the partition If you don't know the partition names - but you will need to know which one it is fdisk -l


1

What you want is a custom pam solution. Pluggable Authentication Modules are capable of doing things like this with minimal difficulty. The challenge is to manage the users. The two ways to accomplish this depends on where you are keeping your main user database. If you are using LDAP, the ldap modules have options to restrict users based on various ...


1

Depends entirely on what mechanism you're using. NFS with sys authentication purely relies on the user/group/other permissions and UID/GID matching. So you have to figure out 'by hand' whether any given user is a member of the right group. Remote users ... are validated by the server hosting the storage, so you can simply refer to your local name lookup. ...


2

Okay, i solved it myself. With help of find / -nouser -o -nogroup 2> /dev/null you see all unlinked/unowned files on your system and you can delete every single file left on your system. If you didn't use -r option with userdel command, you can do the following to get rid of all old user's files. Delete removed user's home directory. cd /home; rm -r ...


5

useradd only uses the same UID and GID when either: It won't cause a conflict; or You force it with the -u and -g flags It will skip over already-in-use IDs. So, I would guess that you have added other users and/or groups since you created those that have matching UID/GID pairs.ยน To get the IDs back in lock-step, you could create the next one with -g ...


0

The users group is the only group really required, these days most desktop environments / window managers use polkit(policy kit) to control who can perform actions such as shutdown and mounting flash drives etc without root. Generally polkit is configured by default to allow local users (those not remoted in through ssh etc) to perform these actions. Some ...


0

If you want to list users whose primary group is somegroup: gid=$(getent group somegroup | awk -F : '{print $3}') getent passwd | awk -F : -v gid="$gid" '$4 == gid' This answer assumes a non-embedded Linux as it relies on the Glibc getent utility. You can configure the fields you want in the output by tweaking the second awk command. For example, to ...


0

#!/bin/bash cut -d : -f 1 /etc/passwd | while read user do # check if user is in specific group `groups $user` | grep -q <SPECIFICGROUP> if [ $? -ne 0 ] ; then continue; fi printf "User=${user},password=`awk -F: -v user=$user '$1 == user { print $2 ;} '`" done edit: does not handle the case if a username is the prefix ...


4

adduser is there for compatibility with older versions of RHEL, and with other OSes. For purely command-line operation, useradd is the preferred method. system-config-users doesn't fit in the same category as the other two. It is a GUI program. It's implemented in terms of userhelper, which has a command line I/O interface more suitable for use as the ...


3

You should also ensure that you have the right to access (go through) the /home/nazeem/public_html and /home/nazeem folders. You can achieve this by doing a chgrp to group deploy on both folders, and setting the execution rights for the group on these folders (execution permission on a directory gives the right to go through it). chgrp deploy ...



Top 50 recent answers are included