Questions tagged [uid]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-1 votes
1 answer
39 views

passwd source code

I am trying to look at the source code of the passwd and gpasswd programs. These tools check the effective UID set to zero to complete execution successfully. But I am a noob to C and couldn't find ...
user avatar
  • 111
11 votes
2 answers
1k views

Is there a file besides /etc/passwd that contains/defines my UID?

Trying to learn about UIDs and GIDs. Various online reading led me to believe that my UID is saved in /etc/passwd, but this doesn't appear to be the case on a server where I work: $ whoami user1 $ cat ...
user avatar
  • 1,311
0 votes
3 answers
59 views

Which command should I use as root to spawn a process with overridden numeric uid/gid/groups?

Which command (available in distro repositories) should I use start a shell with specified numeric uid, gid and groups? Typically su is used to change from root to other user, but it tries to look up ...
user avatar
  • 5,176
0 votes
0 answers
101 views

undo usermod for root?

At some point where I wanted to do sudo usermod -v 1000-1000 USER sudo usermod -w 1000-1000 USER I accidentally applied both these commands to root. According to the documentation I can undo these ...
user avatar
1 vote
0 answers
76 views

Can't change gid with mount

I'm mounting a MicroSD card using this command: mount -t vfat -o uid=1001,gid=1001 /dev/mmcblk0p1 /media/sd After that, I issue a mount command and notice that gid=100 in the listing. I've tried ...
user avatar
  • 11
0 votes
1 answer
118 views

Is there any file/directory permission effect if change uid or gid on Linux?

If group and user's settings are group name: group1 gid: 2000 user name: user1 uid: 2000 Some directory's permission is Directory: /application Owner: user1 Group: group1 When change the gid and ...
user avatar
  • 103
2 votes
0 answers
96 views

Sync LDAP groups and UIDs with Active Directory

Currently, our organization has a working OpenLDAP server that we use to login to our Linux environments. However, due to the increase in Windows devices, the higher-ups have decided to migrate to an ...
user avatar
  • 121
1 vote
2 answers
134 views

Add another root with different uid and name

I know that root has full admin rights thanks to something in the kernel that gives to uid 0 those rights. I think that also the name "root" is defined in the kernel, right? And the location ...
user avatar
  • 639
1 vote
0 answers
60 views

One particular UID causes very slow performance

One of our accounts on a CentOS 7 machine experienced very slow disk read/write.  I started looking into this because the 1007 user on this machine ran wget much slower than other user/machines. id ...
user avatar
1 vote
0 answers
356 views

Attempting to get root UID from root EUID

So here is the situation. I have a hypothetical system with 2 users - 'user1' and 'root'. The user 'user1' is just a normal non-sudoer user with uid=1000, and the root, is just a normal root user with ...
user avatar
2 votes
1 answer
459 views

Can not execute sudo commands on aws ec2 instance ssh http all ports are off

recently I have been facing a serious issue on one of my servers. While accessing my server with solar putty on windows I got error accessing the server message on the response. So I tried from my ...
user avatar
1 vote
1 answer
1k views

Trying to change uid to user, but says it already exists

I'm trying to change the UID of user ec2-user to 500, when I try the following command getting the error UID already exists. sudo usermod -u 500 ec2-user usermod: UID '500' already exists I'm doing a ...
user avatar
  • 111
0 votes
1 answer
319 views

Problem in gaining uid of the system caller in a system call LKM using cred.h

I was trying to get the uid of the process runner which is calling my syscall. I use linux/cred.h and its macro called current_uid() . The problem is that it returns a type which is unknown for me, ...
user avatar
  • 47
0 votes
1 answer
518 views

Allow ssh access for users with certain UID from certain IP's

I need to allow ssh access to all users, but if the UID is between 6000 and 6500 I need to check if the IP where the ssh is coming from is in the file /etc/remote-hosts. /etc/remote-hosts 1.2.3.4 5.6....
user avatar
1 vote
0 answers
71 views

Start NFS server without UID and GID of Unix directory

I'm trying to set up a NFS Server on Windows to map a folder of a Unix system connected to the same network. The second step in the tutorial How to set up a free NFS server on Windows 10 (sections 4 ...
user avatar
0 votes
2 answers
100 views

How can I test that a buildah script is run under buildah-unshare?

If I have a script that uses buildah mount. I use the same way the docs specify, mnt=$(buildah mount $ctr) If I invoke my script sh ./build.sh, I get cannot mount using driver overlay in rootless ...
user avatar
  • 22.9k
0 votes
0 answers
32 views

Prevent deb installation from creating new accounts

We are configuring a variety of servers programmatically, and we periodically need to be able to migrate volumes from one server to another. After migrating a volume, we are currently executing chown ...
user avatar
  • 101
2 votes
2 answers
220 views

Switch to other user instead root while using sudo

I would like to redirect (switch) one execution to other user instead root while using sudo. Example: sudo startup.sh will execute the startup.sh as root, but what is needed is for it to be executed ...
user avatar
  • 21
5 votes
2 answers
226 views

an executable emits “pax archive volume change required”

I'm trying to run a ./configure executable for a software (I'm doing it through a remote Linux machine using PuTTY) and at some point it says: ATTENTION! pax archive volume change required. Ready for ...
user avatar
2 votes
0 answers
454 views

Changing minimum UID to SSH into server

Our Linux HPC server (RHEL 7) only accepts logins to interactive sessions from users with UID >= 1000. However, some of our users have UID lower than that because their usernames were created on a ...
user avatar
0 votes
1 answer
617 views

Changing the User UID of a User with No Name

If a user has an UID but no name, ie: $ whoami whoami: cannot find name for user ID 1001 $ id uid=1001 gid=0(root) groups=0(root) is it possible to change the UID but still leave the user name ...
user avatar
0 votes
0 answers
18 views

Perl resets the EUID only when executing multiple commands through `env - /usr/bin/perl -e 'system("...")'`? [duplicate]

I was playing around with setuid perl for command execution (insecure). I learned from another question, that env - /usr/bin/perl -e 'system("...")' doesn't reset the EUID to RUID, like it's the ...
user avatar
  • 3,357
0 votes
1 answer
3k views

Proxmox LXC storage share, permission problems

I'm totally new in these enviroments but I'm trying to learn. I installed proxmox on a single SSD, then attached one HDD(/dev/sdb) to the system for media storage. The basic idea was to create one ...
user avatar
1 vote
1 answer
169 views

POSIX compliant way of writing conditional operators [duplicate]

In bash you can do if [ $(echo $UID) != 0 ] then echo "Run as root" exit fi This returns an error message when I run the script with dash or other POSIX-compliant shells. How do you do this ...
user avatar
  • 13
1 vote
0 answers
86 views

Solaris 11.4 RBAC works for vim, not for su

I want to access some commands as root, for a normal user. I create the profile profiles -p "privileged" set desc="privileged profile" add cmd=/bin/su set euid=0 end commit exit Then I add profile ...
user avatar
  • 11k
2 votes
1 answer
152 views

Why do processes have UID/GID?

What's the point of UID and GID in processes' parameters? There is EUID, RUID, SUID (and for Linux FSUID) that determine process privileges. I can't think what's the use of UID/GID in such scenario. ...
user avatar
  • 345
1 vote
1 answer
626 views

change UID and GID file attributes on read only file system with mount [duplicate]

I have some file image of filesystem, and I want mount it with parameter changing files and directories UID and GID. I cannot change its parameters, because it is read-only filesystem. I found some ...
user avatar
  • 597
5 votes
2 answers
2k views

Questions about the saved user ID

As far as I understood the different user IDs are as follows (from the perspective of a process): real user ID: the user ID that owns the process effective user ID: the user ID which determines what ...
user avatar
  • 175
1 vote
0 answers
302 views

UID/GID mapping for external storage across different POSIX systems [duplicate]

I have access to multiple POSIX desktops where my personal user account has different UID/GID. I use an ext4 formatted portable SSD, which is great for my work, except for the permissioning issues ...
user avatar
  • 111
1 vote
1 answer
7k views

Get users with UID >= 1000 from /etc/passwd

I am trying to get usernames from /etc/passwd if UID equal/greater than 1000 using a for loop. The below simple bash script works but prints the username twice for some reason. #!/bin/bash for ...
user avatar
  • 13
1 vote
0 answers
1k views

Specify UID/GID for NFS mount (CentOS 7)

I have two servers svrA and svrB (both CentOS 7), where svrA is a turn-key system so I cannot change anything on it, and svrB is the one I am working on. svrA contains log files I need to transfer to ...
user avatar
0 votes
1 answer
66 views

Predictable UIDs of users created in the process of portage package installation

Adding users is specified in portage ebuild files using the enewuser function. Some ebuilds call this function with a specific UID (second argument), others either don't provide the argument or ...
user avatar
3 votes
1 answer
578 views

When did user accounts using UIDs above 1000 become normal? And why?

We have a really old NIS domain which is mapping some user accounts to UIDs less than 1000. I'm wondering when did using UIDs greater than or equal to 1000 for human users become 'standard', why did ...
user avatar
2 votes
1 answer
170 views

ID inheritance – Which IDs?

I'm learning UNIX file permissions / ID inheritance and would like to clarify something: I have this list of permissions, users, groups and files: -rwxr-xr-x userA A foo -rw-rwsr-x userB B bar ...
user avatar
3 votes
1 answer
151 views

How essential are usernames ( compared to uids )?

Background: I recently read about a freedesktop.org-bug which allowed executing any systemctl command for uid > INT_MAX. Thus I ran: root@host$> useradd -u 4000000000 largeuiduser root@host$&...
user avatar
0 votes
0 answers
76 views

Is there a recommended way to access files owned by a non-user UID?

Suppose a multiboot computer on which two GNU/Linux distributions are installed, each with its own user(s). Say those users don't share the same UID over the two systems. Now one needs to access the ...
user avatar
5 votes
1 answer
17k views

Assignment of UID and GID from Active Directory

My CentOS 7 machine has successfully joined a domain FOOBAR (as verified by realm list) and here's the information about an user coming from the AD (non-local): [root@centos7 ~]# id jdoe@FOOBAR....
user avatar
  • 25.8k
1 vote
1 answer
1k views

Mapping user to filesystem user when UID's mismatch?

Say I have a user named user with UID 1001 on one system and the same user (named user) with another UID, let's say 1002. If I unplug the disk drive from the second system and plug it into the first, ...
user avatar
  • 26.3k
0 votes
1 answer
347 views

How to create multiple IDs with same UID in AIX ? How to change UID of IDs in AIX?

How to create multiple IDs with same UID in AIX ? How to change UID of IDs in AIX ?
user avatar
6 votes
1 answer
2k views

First process in a new Linux user namespace needs to call setuid()?

I'm learning about Linux user namespaces and I'm observing a strange behavior which isn't completely clear to me. I've created a range of UIDs in initial user namespaces to which I can map UIDs in ...
user avatar
  • 412
0 votes
3 answers
226 views

Shell script example to stop execution of all processes with a certain UID? [duplicate]

I can't seem to find any examples on the internet for this particular task.
user avatar
  • 1
2 votes
1 answer
290 views

How does sudo achieve changing the privileges of a process?

From man sudo When sudo executes a command, the security policy specifies the execution environment for the command. Typically, the real and effective user and group and IDs are set to match ...
user avatar
  • 90.7k
0 votes
0 answers
1k views

What is the usage of set-user-ID of a program file?

From APUE When we execute a program file, the effective user ID of the process is usually the real user ID. However, we can also set the set-user-ID bit in the file’s mode word (st_mode) that ...
user avatar
  • 90.7k
1 vote
1 answer
1k views

With set-user-ID bit on, are both the process's EUID and saved set-user-ID changed to the file's user ID?

From APUE The saved set-user-ID is copied from the effective user ID by exec functions. If the file’s set-user-ID bit is set, this copy is saved after exec stores the effective user ID from the file’...
user avatar
  • 90.7k
4 votes
2 answers
534 views

systemd DynamicUser= services v.s. journald splits

systemd-journald has the default config SplitMode=uid, to create individual journal (log) files for each user, which they are allowed to read. When running services with DynamicUser=, does this mean ...
user avatar
  • 44.5k
0 votes
1 answer
94 views

uidgid file - UID in parentheses

Looking at file /usr/share/doc/setup-*/uidgid on RHEL7, I can see some lines containing -, ? or number in parentheses: ... nslcd 65 (55) / /sbin/nologin nslcd wine - 66 - - ...
user avatar
  • 4,100
1 vote
1 answer
776 views

Can I have two users with the same name but different UID's?

I have a server that I use for playing around with. I want to set up an email account that is @.com, but the way that SquirrelMail and the mail server is set up, the home folder for the username has ...
user avatar
0 votes
1 answer
459 views

Where to obtain the uidgid file

I was reading /etc/bashrc and saw the following: # By default, we want umask to get set. This sets it for non-login shell. # Current threshold for system reserved uid/gids is 200 # You could check ...
user avatar
  • 230
0 votes
1 answer
2k views

sed to change userid in /etc/passwd to zero

I am trying to change user monitor uid in /etc/passwd , but below gives me an error: sed -s /etc/passwd <<-"EOF" /^\(monitor:[^:]*:\)[0-9]*:[0-9]*:/s//\10:0:/ w q EOF
user avatar
  • 413
19 votes
1 answer
24k views

What is the /etc/subuid file? [closed]

Following docker instructions, I've run a docker with dockerd --userns-remap=default which added this line to the /etc/subuid file: dockremap:165536:65536 I don't understand what it means, please ...
user avatar
  • 380